google-cloud-video-transcoder-v1 1.9.0

Google Cloud Client Libraries for Rust - Transcoder API
Documentation
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// Code generated by sidekick. DO NOT EDIT.

/// A dyn-compatible, crate-private version of [super::TranscoderService].
#[async_trait::async_trait]
pub trait TranscoderService: std::fmt::Debug + Send + Sync {
    async fn create_job(
        &self,
        req: crate::model::CreateJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Job>>;

    async fn list_jobs(
        &self,
        req: crate::model::ListJobsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListJobsResponse>>;

    async fn get_job(
        &self,
        req: crate::model::GetJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Job>>;

    async fn delete_job(
        &self,
        req: crate::model::DeleteJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>>;

    async fn create_job_template(
        &self,
        req: crate::model::CreateJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::JobTemplate>>;

    async fn list_job_templates(
        &self,
        req: crate::model::ListJobTemplatesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListJobTemplatesResponse>>;

    async fn get_job_template(
        &self,
        req: crate::model::GetJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::JobTemplate>>;

    async fn delete_job_template(
        &self,
        req: crate::model::DeleteJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>>;
}

/// All implementations of [super::TranscoderService] also implement [TranscoderService].
#[async_trait::async_trait]
impl<T: super::TranscoderService> TranscoderService for T {
    /// Forwards the call to the implementation provided by `T`.
    async fn create_job(
        &self,
        req: crate::model::CreateJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Job>> {
        T::create_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_jobs(
        &self,
        req: crate::model::ListJobsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListJobsResponse>> {
        T::list_jobs(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_job(
        &self,
        req: crate::model::GetJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Job>> {
        T::get_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_job(
        &self,
        req: crate::model::DeleteJobRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>> {
        T::delete_job(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn create_job_template(
        &self,
        req: crate::model::CreateJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::JobTemplate>> {
        T::create_job_template(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn list_job_templates(
        &self,
        req: crate::model::ListJobTemplatesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListJobTemplatesResponse>> {
        T::list_job_templates(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn get_job_template(
        &self,
        req: crate::model::GetJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::JobTemplate>> {
        T::get_job_template(self, req, options).await
    }

    /// Forwards the call to the implementation provided by `T`.
    async fn delete_job_template(
        &self,
        req: crate::model::DeleteJobTemplateRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<()>> {
        T::delete_job_template(self, req, options).await
    }
}