#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Channel {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub organization_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "201")]
pub settings: ::core::option::Option<ChannelSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ChannelSettings {
#[prost(message, optional, tag = "1")]
pub advertisement: ::core::option::Option<AdvertisementSettings>,
#[prost(message, optional, tag = "3")]
pub referer_verification: ::core::option::Option<RefererVerificationSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AdvertisementSettings {
#[prost(oneof = "advertisement_settings::Provider", tags = "100")]
pub provider: ::core::option::Option<advertisement_settings::Provider>,
}
pub mod advertisement_settings {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct YandexDirect {
#[prost(bool, tag = "1")]
pub enable: bool,
#[prost(int64, tag = "2")]
pub page_id: i64,
#[prost(int64, tag = "3")]
pub category: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Provider {
#[prost(message, tag = "100")]
YandexDirect(YandexDirect),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RefererVerificationSettings {
#[prost(bool, tag = "1")]
pub enable: bool,
#[prost(string, repeated, tag = "2")]
pub allowed_domains: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetChannelRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelsRequest {
#[prost(string, tag = "1")]
pub organization_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListChannelsResponse {
#[prost(message, repeated, tag = "1")]
pub channels: ::prost::alloc::vec::Vec<Channel>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateChannelRequest {
#[prost(string, tag = "1")]
pub organization_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "201")]
pub settings: ::core::option::Option<ChannelSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateChannelMetadata {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChannelRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "201")]
pub settings: ::core::option::Option<ChannelSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateChannelMetadata {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteChannelRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteChannelMetadata {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteChannelsRequest {
#[prost(string, tag = "1")]
pub organization_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub channel_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteChannelsMetadata {
#[prost(string, repeated, tag = "1")]
pub channel_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
pub mod channel_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ChannelServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ChannelServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ChannelServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ChannelServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ChannelServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetChannelRequest>,
) -> std::result::Result<tonic::Response<super::Channel>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.ChannelService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::ListChannelsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.ChannelService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateChannelRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ChannelService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateChannelRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ChannelService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteChannelRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ChannelService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteChannelsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ChannelService",
"BatchDelete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::ListAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::access::ListAccessBindingsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/ListAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ChannelService",
"ListAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn set_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::SetAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/SetAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ChannelService",
"SetAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_access_bindings(
&mut self,
request: impl tonic::IntoRequest<
super::super::super::access::UpdateAccessBindingsRequest,
>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ChannelService/UpdateAccessBindings",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ChannelService",
"UpdateAccessBindings",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Episode {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub stream_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub line_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "8")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "9")]
pub dvr_seconds: i64,
#[prost(enumeration = "episode::VisibilityStatus", tag = "10")]
pub visibility_status: i32,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "episode::AccessRights", tags = "1000, 1002, 1003")]
pub access_rights: ::core::option::Option<episode::AccessRights>,
}
pub mod episode {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VisibilityStatus {
Unspecified = 0,
Published = 1,
Unpublished = 2,
}
impl VisibilityStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
VisibilityStatus::Unspecified => "VISIBILITY_STATUS_UNSPECIFIED",
VisibilityStatus::Published => "PUBLISHED",
VisibilityStatus::Unpublished => "UNPUBLISHED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VISIBILITY_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PUBLISHED" => Some(Self::Published),
"UNPUBLISHED" => Some(Self::Unpublished),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "1000")]
PublicAccess(super::EpisodePublicAccessRights),
#[prost(message, tag = "1002")]
AuthSystemAccess(super::EpisodeAuthSystemAccessRights),
#[prost(message, tag = "1003")]
SignUrlAccess(super::EpisodeSignUrlAccessRights),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodePublicAccessRights {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodeAuthSystemAccessRights {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodeSignUrlAccessRights {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Manifest {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(enumeration = "manifest::ManifestType", tag = "2")]
pub r#type: i32,
}
pub mod manifest {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ManifestType {
Unspecified = 0,
Dash = 1,
Hls = 2,
}
impl ManifestType {
pub fn as_str_name(&self) -> &'static str {
match self {
ManifestType::Unspecified => "MANIFEST_TYPE_UNSPECIFIED",
ManifestType::Dash => "DASH",
ManifestType::Hls => "HLS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MANIFEST_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"DASH" => Some(Self::Dash),
"HLS" => Some(Self::Hls),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEpisodeRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEpisodesRequest {
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
#[prost(oneof = "list_episodes_request::ParentId", tags = "1, 2")]
pub parent_id: ::core::option::Option<list_episodes_request::ParentId>,
}
pub mod list_episodes_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParentId {
#[prost(string, tag = "1")]
StreamId(::prost::alloc::string::String),
#[prost(string, tag = "2")]
LineId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEpisodesResponse {
#[prost(message, repeated, tag = "1")]
pub episodes: ::prost::alloc::vec::Vec<Episode>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetEpisodesRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub episode_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetEpisodesResponse {
#[prost(message, repeated, tag = "1")]
pub episodes: ::prost::alloc::vec::Vec<Episode>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEpisodeRequest {
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "5")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "6")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "7")]
pub dvr_seconds: i64,
#[prost(oneof = "create_episode_request::ParentId", tags = "100, 101")]
pub parent_id: ::core::option::Option<create_episode_request::ParentId>,
#[prost(oneof = "create_episode_request::AccessRights", tags = "1000, 1002, 1003")]
pub access_rights: ::core::option::Option<create_episode_request::AccessRights>,
}
pub mod create_episode_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParentId {
#[prost(string, tag = "100")]
StreamId(::prost::alloc::string::String),
#[prost(string, tag = "101")]
LineId(::prost::alloc::string::String),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "1000")]
PublicAccess(super::EpisodePublicAccessParams),
#[prost(message, tag = "1002")]
AuthSystemAccess(super::EpisodeAuthSystemAccessParams),
#[prost(message, tag = "1003")]
SignUrlAccess(super::EpisodeSignUrlAccessParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodePublicAccessParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodeAuthSystemAccessParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodeSignUrlAccessParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEpisodeMetadata {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEpisodeRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "7")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(int64, tag = "8")]
pub dvr_seconds: i64,
#[prost(oneof = "update_episode_request::AccessRights", tags = "1000, 1002, 1003")]
pub access_rights: ::core::option::Option<update_episode_request::AccessRights>,
}
pub mod update_episode_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "1000")]
PublicAccess(super::EpisodePublicAccessParams),
#[prost(message, tag = "1002")]
AuthSystemAccess(super::EpisodeAuthSystemAccessParams),
#[prost(message, tag = "1003")]
SignUrlAccess(super::EpisodeSignUrlAccessParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateEpisodeMetadata {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteEpisodeRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteEpisodeMetadata {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteEpisodesRequest {
#[prost(string, repeated, tag = "1")]
pub episode_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(oneof = "batch_delete_episodes_request::Id", tags = "100, 101")]
pub id: ::core::option::Option<batch_delete_episodes_request::Id>,
}
pub mod batch_delete_episodes_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "100")]
StreamId(::prost::alloc::string::String),
#[prost(string, tag = "101")]
LineId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteEpisodesMetadata {
#[prost(string, repeated, tag = "1")]
pub episode_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformEpisodeActionRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
#[prost(oneof = "perform_episode_action_request::Action", tags = "1002, 1003")]
pub action: ::core::option::Option<perform_episode_action_request::Action>,
}
pub mod perform_episode_action_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "1002")]
Publish(super::PublishEpisodeAction),
#[prost(message, tag = "1003")]
Unpublish(super::UnpublishEpisodeAction),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishEpisodeAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpublishEpisodeAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformEpisodeActionMetadata {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEpisodePlayerUrlRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<EpisodePlayerParams>,
#[prost(message, optional, tag = "3")]
pub signed_url_expiration_duration: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EpisodePlayerParams {
#[prost(bool, tag = "1")]
pub mute: bool,
#[prost(bool, tag = "2")]
pub autoplay: bool,
#[prost(bool, tag = "3")]
pub hidden: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEpisodePlayerUrlResponse {
#[prost(string, tag = "1")]
pub player_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub html: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEpisodeManifestsRequest {
#[prost(string, tag = "1")]
pub episode_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEpisodeManifestsResponse {
#[prost(message, repeated, tag = "1")]
pub manifests: ::prost::alloc::vec::Vec<Manifest>,
}
pub mod episode_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct EpisodeServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl EpisodeServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> EpisodeServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> EpisodeServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
EpisodeServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetEpisodeRequest>,
) -> std::result::Result<tonic::Response<super::Episode>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListEpisodesRequest>,
) -> std::result::Result<
tonic::Response<super::ListEpisodesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn batch_get(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetEpisodesRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetEpisodesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/BatchGet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "BatchGet"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateEpisodeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateEpisodeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteEpisodeRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.EpisodeService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteEpisodesRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.EpisodeService",
"BatchDelete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn perform_action(
&mut self,
request: impl tonic::IntoRequest<super::PerformEpisodeActionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/PerformAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.EpisodeService",
"PerformAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_player_url(
&mut self,
request: impl tonic::IntoRequest<super::GetEpisodePlayerUrlRequest>,
) -> std::result::Result<
tonic::Response<super::GetEpisodePlayerUrlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/GetPlayerURL",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.EpisodeService",
"GetPlayerURL",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_manifests(
&mut self,
request: impl tonic::IntoRequest<super::GetEpisodeManifestsRequest>,
) -> std::result::Result<
tonic::Response<super::GetEpisodeManifestsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.EpisodeService/GetManifests",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.EpisodeService",
"GetManifests",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Playlist {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub items: ::prost::alloc::vec::Vec<PlaylistItem>,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaylistItem {
#[prost(int64, tag = "1")]
pub position: i64,
#[prost(oneof = "playlist_item::Id", tags = "100, 101")]
pub id: ::core::option::Option<playlist_item::Id>,
}
pub mod playlist_item {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Id {
#[prost(string, tag = "100")]
VideoId(::prost::alloc::string::String),
#[prost(string, tag = "101")]
EpisodeId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaylistRequest {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlaylistsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPlaylistsResponse {
#[prost(message, repeated, tag = "1")]
pub playlists: ::prost::alloc::vec::Vec<Playlist>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlaylistRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub items: ::prost::alloc::vec::Vec<PlaylistItem>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlaylistMetadata {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePlaylistRequest {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "5")]
pub items: ::prost::alloc::vec::Vec<PlaylistItem>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePlaylistMetadata {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePlaylistRequest {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeletePlaylistMetadata {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeletePlaylistsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub playlist_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeletePlaylistsMetadata {
#[prost(string, repeated, tag = "1")]
pub playlist_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaylistPlayerUrlRequest {
#[prost(string, tag = "1")]
pub playlist_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<PlaylistPlayerParams>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaylistPlayerParams {
#[prost(bool, tag = "1")]
pub mute: bool,
#[prost(bool, tag = "2")]
pub autoplay: bool,
#[prost(bool, tag = "3")]
pub hidden: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlaylistPlayerUrlResponse {
#[prost(string, tag = "1")]
pub player_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub html: ::prost::alloc::string::String,
}
pub mod playlist_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct PlaylistServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl PlaylistServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> PlaylistServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PlaylistServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
PlaylistServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetPlaylistRequest>,
) -> std::result::Result<tonic::Response<super::Playlist>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.PlaylistService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListPlaylistsRequest>,
) -> std::result::Result<
tonic::Response<super::ListPlaylistsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.PlaylistService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreatePlaylistRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.PlaylistService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePlaylistRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.PlaylistService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeletePlaylistRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.PlaylistService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeletePlaylistsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.PlaylistService",
"BatchDelete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_player_url(
&mut self,
request: impl tonic::IntoRequest<super::GetPlaylistPlayerUrlRequest>,
) -> std::result::Result<
tonic::Response<super::GetPlaylistPlayerUrlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.PlaylistService/GetPlayerURL",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.PlaylistService",
"GetPlayerURL",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Stream {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub line_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(enumeration = "stream::StreamStatus", tag = "8")]
pub status: i32,
#[prost(message, optional, tag = "9")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "10")]
pub publish_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "11")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "12")]
pub auto_publish: ::core::option::Option<bool>,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "stream::StreamType", tags = "1000, 1001")]
pub stream_type: ::core::option::Option<stream::StreamType>,
}
pub mod stream {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum StreamStatus {
Unspecified = 0,
Offline = 1,
Preparing = 2,
Ready = 3,
Onair = 4,
Finished = 5,
}
impl StreamStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
StreamStatus::Unspecified => "STREAM_STATUS_UNSPECIFIED",
StreamStatus::Offline => "OFFLINE",
StreamStatus::Preparing => "PREPARING",
StreamStatus::Ready => "READY",
StreamStatus::Onair => "ONAIR",
StreamStatus::Finished => "FINISHED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"STREAM_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"OFFLINE" => Some(Self::Offline),
"PREPARING" => Some(Self::Preparing),
"READY" => Some(Self::Ready),
"ONAIR" => Some(Self::Onair),
"FINISHED" => Some(Self::Finished),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StreamType {
#[prost(message, tag = "1000")]
OnDemand(super::OnDemand),
#[prost(message, tag = "1001")]
Schedule(super::Schedule),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OnDemand {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StreamLine {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "stream_line::InputType", tags = "1000, 1002")]
pub input_type: ::core::option::Option<stream_line::InputType>,
#[prost(oneof = "stream_line::LineType", tags = "2000, 2001")]
pub line_type: ::core::option::Option<stream_line::LineType>,
}
pub mod stream_line {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum InputType {
#[prost(message, tag = "1000")]
RtmpPush(super::RtmpPushInput),
#[prost(message, tag = "1002")]
RtmpPull(super::RtmpPullInput),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum LineType {
#[prost(message, tag = "2000")]
ManualLine(super::ManualLine),
#[prost(message, tag = "2001")]
AutoLine(super::AutoLine),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PushStreamKey {
#[prost(string, tag = "1")]
pub key: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RtmpPushInput {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RtmpPullInput {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManualLine {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AutoLine {
#[prost(enumeration = "auto_line::AutoLineStatus", tag = "1")]
pub status: i32,
}
pub mod auto_line {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum AutoLineStatus {
Unspecified = 0,
Deactivated = 1,
Active = 2,
}
impl AutoLineStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
AutoLineStatus::Unspecified => "AUTO_LINE_STATUS_UNSPECIFIED",
AutoLineStatus::Deactivated => "DEACTIVATED",
AutoLineStatus::Active => "ACTIVE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTO_LINE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"DEACTIVATED" => Some(Self::Deactivated),
"ACTIVE" => Some(Self::Active),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamLineRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamLinesRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamLinesResponse {
#[prost(message, repeated, tag = "1")]
pub stream_lines: ::prost::alloc::vec::Vec<StreamLine>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetStreamLinesRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub stream_line_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetStreamLinesResponse {
#[prost(message, repeated, tag = "1")]
pub stream_lines: ::prost::alloc::vec::Vec<StreamLine>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamLineRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "create_stream_line_request::InputParams", tags = "1000, 1002")]
pub input_params: ::core::option::Option<create_stream_line_request::InputParams>,
#[prost(oneof = "create_stream_line_request::LineTypeParams", tags = "2000, 2001")]
pub line_type_params: ::core::option::Option<
create_stream_line_request::LineTypeParams,
>,
}
pub mod create_stream_line_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum InputParams {
#[prost(message, tag = "1000")]
RtmpPush(super::RtmpPushParams),
#[prost(message, tag = "1002")]
RtmpPull(super::RtmpPullParams),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum LineTypeParams {
#[prost(message, tag = "2000")]
ManualLine(super::ManualLineParams),
#[prost(message, tag = "2001")]
AutoLine(super::AutoLineParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamLineMetadata {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamLineRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "update_stream_line_request::InputParams", tags = "1000, 1002")]
pub input_params: ::core::option::Option<update_stream_line_request::InputParams>,
}
pub mod update_stream_line_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum InputParams {
#[prost(message, tag = "1000")]
RtmpPush(super::RtmpPushParams),
#[prost(message, tag = "1002")]
RtmpPull(super::RtmpPullParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamLineMetadata {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteStreamLineRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteStreamLineMetadata {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteStreamLinesRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub stream_line_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteStreamLinesMetadata {
#[prost(string, repeated, tag = "1")]
pub stream_line_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformLineActionRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
#[prost(oneof = "perform_line_action_request::Action", tags = "1000, 1001")]
pub action: ::core::option::Option<perform_line_action_request::Action>,
}
pub mod perform_line_action_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "1000")]
Activate(super::ActivateAction),
#[prost(message, tag = "1001")]
Deactivate(super::DeactivateAction),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformLineActionMetadata {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RtmpPushParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RtmpPullParams {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManualLineParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AutoLineParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivateAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeactivateAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamKeyRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamKeyRequest {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamKeyMetadata {
#[prost(string, tag = "1")]
pub stream_line_id: ::prost::alloc::string::String,
}
pub mod stream_line_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct StreamLineServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl StreamLineServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> StreamLineServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamLineServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
StreamLineServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetStreamLineRequest>,
) -> std::result::Result<tonic::Response<super::StreamLine>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamLineService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListStreamLinesRequest>,
) -> std::result::Result<
tonic::Response<super::ListStreamLinesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamLineService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetStreamLinesRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetStreamLinesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/BatchGet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamLineService",
"BatchGet",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateStreamLineRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamLineService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateStreamLineRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamLineService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteStreamLineRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamLineService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteStreamLinesRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamLineService",
"BatchDelete",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn perform_action(
&mut self,
request: impl tonic::IntoRequest<super::PerformLineActionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/PerformAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamLineService",
"PerformAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_stream_key(
&mut self,
request: impl tonic::IntoRequest<super::GetStreamKeyRequest>,
) -> std::result::Result<tonic::Response<super::PushStreamKey>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/GetStreamKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamLineService",
"GetStreamKey",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_stream_key(
&mut self,
request: impl tonic::IntoRequest<super::UpdateStreamKeyRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamLineService/UpdateStreamKey",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamLineService",
"UpdateStreamKey",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetStreamRequest {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListStreamsResponse {
#[prost(message, repeated, tag = "1")]
pub streams: ::prost::alloc::vec::Vec<Stream>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetStreamsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub stream_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetStreamsResponse {
#[prost(message, repeated, tag = "1")]
pub streams: ::prost::alloc::vec::Vec<Stream>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub line_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub auto_publish: ::core::option::Option<bool>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "create_stream_request::StreamType", tags = "1000, 1001")]
pub stream_type: ::core::option::Option<create_stream_request::StreamType>,
}
pub mod create_stream_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StreamType {
#[prost(message, tag = "1000")]
OnDemand(super::OnDemandParams),
#[prost(message, tag = "1001")]
Schedule(super::ScheduleParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OnDemandParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleParams {
#[prost(message, optional, tag = "1")]
pub start_time: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "2")]
pub finish_time: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateStreamMetadata {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamRequest {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub line_id: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "7")]
pub auto_publish: ::core::option::Option<bool>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "update_stream_request::StreamType", tags = "1000, 1001")]
pub stream_type: ::core::option::Option<update_stream_request::StreamType>,
}
pub mod update_stream_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum StreamType {
#[prost(message, tag = "1000")]
OnDemand(super::OnDemandParams),
#[prost(message, tag = "1001")]
Schedule(super::ScheduleParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateStreamMetadata {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteStreamRequest {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteStreamMetadata {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteStreamsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub stream_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteStreamsMetadata {
#[prost(string, repeated, tag = "1")]
pub stream_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformStreamActionRequest {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
#[prost(oneof = "perform_stream_action_request::Action", tags = "1000, 1002")]
pub action: ::core::option::Option<perform_stream_action_request::Action>,
}
pub mod perform_stream_action_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "1000")]
Publish(super::PublishAction),
#[prost(message, tag = "1002")]
Stop(super::StopAction),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformStreamActionMetadata {
#[prost(string, tag = "1")]
pub stream_id: ::prost::alloc::string::String,
}
pub mod stream_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct StreamServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl StreamServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> StreamServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> StreamServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
StreamServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetStreamRequest>,
) -> std::result::Result<tonic::Response<super::Stream>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.StreamService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListStreamsRequest>,
) -> std::result::Result<
tonic::Response<super::ListStreamsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.StreamService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn batch_get(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetStreamsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetStreamsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/BatchGet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamService", "BatchGet"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateStreamRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateStreamRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamService", "Update"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteStreamRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteStreamsRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.StreamService", "BatchDelete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn perform_action(
&mut self,
request: impl tonic::IntoRequest<super::PerformStreamActionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.StreamService/PerformAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.StreamService",
"PerformAction",
),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Subtitle {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub language: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub label: ::prost::alloc::string::String,
#[prost(enumeration = "subtitle::SubtitleStatus", tag = "4")]
pub status: i32,
#[prost(enumeration = "subtitle::SubtitleSourceType", tag = "6")]
pub source_type: i32,
#[prost(string, tag = "5")]
pub filename: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(oneof = "subtitle::ParentId", tags = "1000")]
pub parent_id: ::core::option::Option<subtitle::ParentId>,
}
pub mod subtitle {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SubtitleStatus {
Unspecified = 0,
WaitUploading = 1,
Uploaded = 2,
}
impl SubtitleStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
SubtitleStatus::Unspecified => "SUBTITLE_STATUS_UNSPECIFIED",
SubtitleStatus::WaitUploading => "WAIT_UPLOADING",
SubtitleStatus::Uploaded => "UPLOADED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBTITLE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"WAIT_UPLOADING" => Some(Self::WaitUploading),
"UPLOADED" => Some(Self::Uploaded),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum SubtitleSourceType {
Unspecified = 0,
Manual = 1,
Generated = 2,
}
impl SubtitleSourceType {
pub fn as_str_name(&self) -> &'static str {
match self {
SubtitleSourceType::Unspecified => "SUBTITLE_SOURCE_TYPE_UNSPECIFIED",
SubtitleSourceType::Manual => "MANUAL",
SubtitleSourceType::Generated => "GENERATED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SUBTITLE_SOURCE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"MANUAL" => Some(Self::Manual),
"GENERATED" => Some(Self::Generated),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParentId {
#[prost(string, tag = "1000")]
VideoId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSubtitleRequest {
#[prost(string, tag = "1")]
pub subtitle_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSubtitlesRequest {
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(oneof = "list_subtitles_request::ParentId", tags = "1000")]
pub parent_id: ::core::option::Option<list_subtitles_request::ParentId>,
}
pub mod list_subtitles_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParentId {
#[prost(string, tag = "1000")]
VideoId(::prost::alloc::string::String),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSubtitlesResponse {
#[prost(message, repeated, tag = "1")]
pub subtitles: ::prost::alloc::vec::Vec<Subtitle>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSubtitleRequest {
#[prost(string, tag = "1")]
pub language: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
#[prost(oneof = "create_subtitle_request::ParentId", tags = "1000")]
pub parent_id: ::core::option::Option<create_subtitle_request::ParentId>,
#[prost(oneof = "create_subtitle_request::Source", tags = "1100")]
pub source: ::core::option::Option<create_subtitle_request::Source>,
}
pub mod create_subtitle_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ParentId {
#[prost(string, tag = "1000")]
VideoId(::prost::alloc::string::String),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1100")]
Upload(super::SubtitleUploadParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubtitleUploadParams {
#[prost(string, tag = "1")]
pub filename: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSubtitleMetadata {
#[prost(string, tag = "1")]
pub subtitle_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateSubtitleUploadUrlRequest {
#[prost(string, tag = "1")]
pub subtitle_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateSubtitleUploadUrlResponse {
#[prost(string, tag = "1")]
pub upload_url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSubtitleRequest {
#[prost(string, tag = "1")]
pub subtitle_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSubtitleMetadata {
#[prost(string, tag = "1")]
pub subtitle_id: ::prost::alloc::string::String,
}
pub mod subtitle_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct SubtitleServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl SubtitleServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> SubtitleServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> SubtitleServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
SubtitleServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetSubtitleRequest>,
) -> std::result::Result<tonic::Response<super::Subtitle>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.SubtitleService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.SubtitleService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListSubtitlesRequest>,
) -> std::result::Result<
tonic::Response<super::ListSubtitlesResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.SubtitleService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.SubtitleService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateSubtitleRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.SubtitleService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.SubtitleService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn generate_upload_url(
&mut self,
request: impl tonic::IntoRequest<super::GenerateSubtitleUploadUrlRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateSubtitleUploadUrlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.SubtitleService/GenerateUploadURL",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.SubtitleService",
"GenerateUploadURL",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteSubtitleRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.SubtitleService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.SubtitleService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Thumbnail {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetThumbnailRequest {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListThumbnailRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListThumbnailResponse {
#[prost(message, repeated, tag = "1")]
pub thumbnails: ::prost::alloc::vec::Vec<Thumbnail>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateThumbnailRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateThumbnailMetadata {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGenerateDownloadUrLsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub thumbnail_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGenerateDownloadUrLsResponse {
#[prost(message, repeated, tag = "1")]
pub download_urls: ::prost::alloc::vec::Vec<ThumbnailDownloadUrl>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ThumbnailDownloadUrl {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub original_url: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub scaled_urls: ::prost::alloc::vec::Vec<thumbnail_download_url::ScaledUrl>,
}
pub mod thumbnail_download_url {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScaledUrl {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub max_width: i64,
#[prost(int64, tag = "3")]
pub max_height: i64,
#[prost(enumeration = "ImageFormat", tag = "4")]
pub image_format: i32,
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum ImageFormat {
Unspecified = 0,
Jpeg = 1,
Webp = 2,
}
impl ImageFormat {
pub fn as_str_name(&self) -> &'static str {
match self {
ImageFormat::Unspecified => "IMAGE_FORMAT_UNSPECIFIED",
ImageFormat::Jpeg => "JPEG",
ImageFormat::Webp => "WEBP",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"IMAGE_FORMAT_UNSPECIFIED" => Some(Self::Unspecified),
"JPEG" => Some(Self::Jpeg),
"WEBP" => Some(Self::Webp),
_ => None,
}
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateThumbnailUploadUrlRequest {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GenerateThumbnailUploadUrlResponse {
#[prost(string, tag = "1")]
pub upload_url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteThumbnailRequest {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteThumbnailMetadata {
#[prost(string, tag = "1")]
pub thumbnail_id: ::prost::alloc::string::String,
}
pub mod thumbnail_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct ThumbnailServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl ThumbnailServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> ThumbnailServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> ThumbnailServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
ThumbnailServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetThumbnailRequest>,
) -> std::result::Result<tonic::Response<super::Thumbnail>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ThumbnailService", "Get"),
);
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListThumbnailRequest>,
) -> std::result::Result<
tonic::Response<super::ListThumbnailResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ThumbnailService", "List"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateThumbnailRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ThumbnailService", "Create"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_generate_download_ur_ls(
&mut self,
request: impl tonic::IntoRequest<super::BatchGenerateDownloadUrLsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGenerateDownloadUrLsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/BatchGenerateDownloadURLs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ThumbnailService",
"BatchGenerateDownloadURLs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn generate_upload_url(
&mut self,
request: impl tonic::IntoRequest<super::GenerateThumbnailUploadUrlRequest>,
) -> std::result::Result<
tonic::Response<super::GenerateThumbnailUploadUrlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/GenerateUploadURL",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.ThumbnailService",
"GenerateUploadURL",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteThumbnailRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.ThumbnailService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.ThumbnailService", "Delete"),
);
self.inner.unary(req, path, codec).await
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Video {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(enumeration = "video::VideoStatus", tag = "6")]
pub status: i32,
#[prost(string, tag = "18")]
pub error_message: ::prost::alloc::string::String,
#[prost(enumeration = "video::VisibilityStatus", tag = "9")]
pub visibility_status: i32,
#[prost(message, optional, tag = "8")]
pub duration: ::core::option::Option<::prost_types::Duration>,
#[prost(enumeration = "AutoTranscode", tag = "11")]
pub auto_transcode: i32,
#[prost(message, optional, tag = "17")]
pub enable_ad: ::core::option::Option<bool>,
#[prost(string, repeated, tag = "12")]
pub subtitle_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "13")]
pub features: ::core::option::Option<VideoFeatures>,
#[prost(message, optional, tag = "100")]
pub created_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(message, optional, tag = "101")]
pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "video::Source", tags = "1000")]
pub source: ::core::option::Option<video::Source>,
#[prost(oneof = "video::AccessRights", tags = "2000, 2003")]
pub access_rights: ::core::option::Option<video::AccessRights>,
}
pub mod video {
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VideoStatus {
Unspecified = 0,
WaitUploading = 1,
Uploaded = 2,
Processing = 4,
Ready = 5,
Error = 7,
}
impl VideoStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
VideoStatus::Unspecified => "VIDEO_STATUS_UNSPECIFIED",
VideoStatus::WaitUploading => "WAIT_UPLOADING",
VideoStatus::Uploaded => "UPLOADED",
VideoStatus::Processing => "PROCESSING",
VideoStatus::Ready => "READY",
VideoStatus::Error => "ERROR",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VIDEO_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"WAIT_UPLOADING" => Some(Self::WaitUploading),
"UPLOADED" => Some(Self::Uploaded),
"PROCESSING" => Some(Self::Processing),
"READY" => Some(Self::Ready),
"ERROR" => Some(Self::Error),
_ => None,
}
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum VisibilityStatus {
Unspecified = 0,
Published = 1,
Unpublished = 2,
}
impl VisibilityStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
VisibilityStatus::Unspecified => "VISIBILITY_STATUS_UNSPECIFIED",
VisibilityStatus::Published => "PUBLISHED",
VisibilityStatus::Unpublished => "UNPUBLISHED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"VISIBILITY_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"PUBLISHED" => Some(Self::Published),
"UNPUBLISHED" => Some(Self::Unpublished),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1000")]
Tusd(super::VideoTusdSource),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "2000")]
PublicAccess(super::VideoPublicAccessRights),
#[prost(message, tag = "2003")]
SignUrlAccess(super::VideoSignUrlAccessRights),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoTusdSource {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub file_size: i64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoPublicAccessRights {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoSignUrlAccessRights {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoFeatures {
#[prost(message, optional, tag = "1")]
pub summary: ::core::option::Option<video_features::Summary>,
}
pub mod video_features {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Summary {
#[prost(enumeration = "FeatureResult", tag = "1")]
pub result: i32,
#[prost(message, repeated, tag = "3")]
pub urls: ::prost::alloc::vec::Vec<summary::SummaryUrl>,
}
pub mod summary {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SummaryUrl {
#[prost(string, tag = "1")]
pub url: ::prost::alloc::string::String,
#[prost(int64, tag = "2")]
pub track_index: i64,
#[prost(string, tag = "3")]
pub src_lang: ::prost::alloc::string::String,
}
}
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum FeatureResult {
Unspecified = 0,
NotRequested = 1,
Processing = 2,
Success = 3,
Failed = 4,
}
impl FeatureResult {
pub fn as_str_name(&self) -> &'static str {
match self {
FeatureResult::Unspecified => "FEATURE_RESULT_UNSPECIFIED",
FeatureResult::NotRequested => "NOT_REQUESTED",
FeatureResult::Processing => "PROCESSING",
FeatureResult::Success => "SUCCESS",
FeatureResult::Failed => "FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"FEATURE_RESULT_UNSPECIFIED" => Some(Self::Unspecified),
"NOT_REQUESTED" => Some(Self::NotRequested),
"PROCESSING" => Some(Self::Processing),
"SUCCESS" => Some(Self::Success),
"FAILED" => Some(Self::Failed),
_ => None,
}
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AutoTranscode {
Unspecified = 0,
Enable = 1,
Disable = 2,
}
impl AutoTranscode {
pub fn as_str_name(&self) -> &'static str {
match self {
AutoTranscode::Unspecified => "AUTO_TRANSCODE_UNSPECIFIED",
AutoTranscode::Enable => "ENABLE",
AutoTranscode::Disable => "DISABLE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"AUTO_TRANSCODE_UNSPECIFIED" => Some(Self::Unspecified),
"ENABLE" => Some(Self::Enable),
"DISABLE" => Some(Self::Disable),
_ => None,
}
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVideoRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(int64, tag = "100")]
pub page_size: i64,
#[prost(string, tag = "101")]
pub page_token: ::prost::alloc::string::String,
#[prost(string, tag = "102")]
pub order_by: ::prost::alloc::string::String,
#[prost(string, tag = "103")]
pub filter: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListVideoResponse {
#[prost(message, repeated, tag = "1")]
pub videos: ::prost::alloc::vec::Vec<Video>,
#[prost(string, tag = "100")]
pub next_page_token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetVideosRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub video_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetVideosResponse {
#[prost(message, repeated, tag = "1")]
pub videos: ::prost::alloc::vec::Vec<Video>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVideoRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(enumeration = "AutoTranscode", tag = "5")]
pub auto_transcode: i32,
#[prost(message, optional, tag = "7")]
pub auto_publish: ::core::option::Option<bool>,
#[prost(message, optional, tag = "8")]
pub enable_ad: ::core::option::Option<bool>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "create_video_request::Source", tags = "1000")]
pub source: ::core::option::Option<create_video_request::Source>,
#[prost(oneof = "create_video_request::AccessRights", tags = "2000, 2003")]
pub access_rights: ::core::option::Option<create_video_request::AccessRights>,
}
pub mod create_video_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1000")]
Tusd(super::VideoTusdParams),
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "2000")]
PublicAccess(super::VideoPublicAccessParams),
#[prost(message, tag = "2003")]
SignUrlAccess(super::VideoSignUrlAccessParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoTusdParams {
#[prost(int64, tag = "1")]
pub file_size: i64,
#[prost(string, tag = "2")]
pub file_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoPublicAccessParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoSignUrlAccessParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateVideoMetadata {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVideoRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, tag = "3")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub description: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub thumbnail_id: ::prost::alloc::string::String,
#[prost(enumeration = "AutoTranscode", tag = "6")]
pub auto_transcode: i32,
#[prost(message, optional, tag = "8")]
pub enable_ad: ::core::option::Option<bool>,
#[prost(map = "string, string", tag = "200")]
pub labels: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(oneof = "update_video_request::AccessRights", tags = "2000, 2003")]
pub access_rights: ::core::option::Option<update_video_request::AccessRights>,
}
pub mod update_video_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AccessRights {
#[prost(message, tag = "2000")]
PublicAccess(super::VideoPublicAccessParams),
#[prost(message, tag = "2003")]
SignUrlAccess(super::VideoSignUrlAccessParams),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateVideoMetadata {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranscodeVideoRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub field_mask: ::core::option::Option<::prost_types::FieldMask>,
#[prost(string, repeated, tag = "3")]
pub subtitle_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub translation_settings: ::core::option::Option<VideoTranslationSettings>,
#[prost(message, optional, tag = "5")]
pub summarization_settings: ::core::option::Option<VideoSummarizationSettings>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoTranslationSettings {
#[prost(message, repeated, tag = "1")]
pub tracks: ::prost::alloc::vec::Vec<video_translation_settings::TranslationTrack>,
}
pub mod video_translation_settings {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranslationTrack {
#[prost(message, optional, tag = "1")]
pub input_track: ::core::option::Option<InputTrack>,
#[prost(message, repeated, tag = "2")]
pub subtitles: ::prost::alloc::vec::Vec<SubtitleTrack>,
#[prost(message, repeated, tag = "3")]
pub audio: ::prost::alloc::vec::Vec<AudioTrack>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputTrack {
#[prost(int64, tag = "1")]
pub track_index: i64,
#[prost(string, tag = "2")]
pub src_lang: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubtitleTrack {
#[prost(string, tag = "1")]
pub dst_lang: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AudioTrack {
#[prost(string, tag = "1")]
pub dst_lang: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub label: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoSummarizationSettings {
#[prost(message, repeated, tag = "2")]
pub tracks: ::prost::alloc::vec::Vec<
video_summarization_settings::SummarizationTrack,
>,
#[prost(bool, tag = "3")]
pub process_all_tracks: bool,
}
pub mod video_summarization_settings {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SummarizationTrack {
#[prost(message, optional, tag = "1")]
pub input_track: ::core::option::Option<InputTrack>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputTrack {
#[prost(int64, tag = "1")]
pub track_index: i64,
#[prost(string, tag = "2")]
pub src_lang: ::prost::alloc::string::String,
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TranscodeVideoMetadata {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVideoRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteVideoMetadata {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteVideosRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub video_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchDeleteVideosMetadata {
#[prost(string, repeated, tag = "1")]
pub video_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformVideoActionRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
#[prost(oneof = "perform_video_action_request::Action", tags = "1000, 1001")]
pub action: ::core::option::Option<perform_video_action_request::Action>,
}
pub mod perform_video_action_request {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Action {
#[prost(message, tag = "1000")]
Publish(super::PublishVideoAction),
#[prost(message, tag = "1001")]
Unpublish(super::UnpublishVideoAction),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PublishVideoAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnpublishVideoAction {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PerformVideoActionMetadata {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoPlayerUrlRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub params: ::core::option::Option<VideoPlayerParams>,
#[prost(message, optional, tag = "3")]
pub signed_url_expiration_duration: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VideoPlayerParams {
#[prost(bool, tag = "1")]
pub mute: bool,
#[prost(bool, tag = "2")]
pub autoplay: bool,
#[prost(bool, tag = "3")]
pub hidden: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoPlayerUrlResponse {
#[prost(string, tag = "1")]
pub player_url: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub html: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetVideoPlayerUrLsRequest {
#[prost(string, tag = "1")]
pub channel_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub video_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub params: ::core::option::Option<VideoPlayerParams>,
#[prost(message, optional, tag = "4")]
pub signed_url_expiration_duration: ::core::option::Option<::prost_types::Duration>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetVideoPlayerUrLsResponse {
#[prost(string, repeated, tag = "1")]
pub player_urls: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoManifestsRequest {
#[prost(string, tag = "1")]
pub video_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetVideoManifestsResponse {
#[prost(message, repeated, tag = "1")]
pub manifests: ::prost::alloc::vec::Vec<Manifest>,
}
pub mod video_service_client {
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct VideoServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl VideoServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> VideoServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> VideoServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::BoxBody>,
>>::Error: Into<StdError> + Send + Sync,
{
VideoServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn get(
&mut self,
request: impl tonic::IntoRequest<super::GetVideoRequest>,
) -> std::result::Result<tonic::Response<super::Video>, tonic::Status> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/Get",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.VideoService", "Get"));
self.inner.unary(req, path, codec).await
}
pub async fn list(
&mut self,
request: impl tonic::IntoRequest<super::ListVideoRequest>,
) -> std::result::Result<
tonic::Response<super::ListVideoResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/List",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.VideoService", "List"));
self.inner.unary(req, path, codec).await
}
pub async fn batch_get(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetVideosRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetVideosResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/BatchGet",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.VideoService", "BatchGet"),
);
self.inner.unary(req, path, codec).await
}
pub async fn create(
&mut self,
request: impl tonic::IntoRequest<super::CreateVideoRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/Create",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.VideoService", "Create"));
self.inner.unary(req, path, codec).await
}
pub async fn update(
&mut self,
request: impl tonic::IntoRequest<super::UpdateVideoRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/Update",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.VideoService", "Update"));
self.inner.unary(req, path, codec).await
}
pub async fn transcode(
&mut self,
request: impl tonic::IntoRequest<super::TranscodeVideoRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/Transcode",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.VideoService", "Transcode"),
);
self.inner.unary(req, path, codec).await
}
pub async fn delete(
&mut self,
request: impl tonic::IntoRequest<super::DeleteVideoRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/Delete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("yandex.cloud.video.v1.VideoService", "Delete"));
self.inner.unary(req, path, codec).await
}
pub async fn batch_delete(
&mut self,
request: impl tonic::IntoRequest<super::BatchDeleteVideosRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/BatchDelete",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.VideoService", "BatchDelete"),
);
self.inner.unary(req, path, codec).await
}
pub async fn perform_action(
&mut self,
request: impl tonic::IntoRequest<super::PerformVideoActionRequest>,
) -> std::result::Result<
tonic::Response<super::super::super::operation::Operation>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/PerformAction",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.VideoService",
"PerformAction",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_player_url(
&mut self,
request: impl tonic::IntoRequest<super::GetVideoPlayerUrlRequest>,
) -> std::result::Result<
tonic::Response<super::GetVideoPlayerUrlResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/GetPlayerURL",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.VideoService", "GetPlayerURL"),
);
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_player_ur_ls(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetVideoPlayerUrLsRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetVideoPlayerUrLsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/BatchGetPlayerURLs",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"yandex.cloud.video.v1.VideoService",
"BatchGetPlayerURLs",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_manifests(
&mut self,
request: impl tonic::IntoRequest<super::GetVideoManifestsRequest>,
) -> std::result::Result<
tonic::Response<super::GetVideoManifestsResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::new(
tonic::Code::Unknown,
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/yandex.cloud.video.v1.VideoService/GetManifests",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("yandex.cloud.video.v1.VideoService", "GetManifests"),
);
self.inner.unary(req, path, codec).await
}
}
}