google-cloud-grafeas-v1 1.12.0

Google Cloud Client Libraries for Rust - Container Analysis 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::Grafeas].
#[async_trait::async_trait]
pub trait Grafeas: std::fmt::Debug + Send + Sync {
    async fn get_occurrence(
        &self,
        req: crate::model::GetOccurrenceRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Occurrence>>;

    async fn list_occurrences(
        &self,
        req: crate::model::ListOccurrencesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListOccurrencesResponse>>;

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

    async fn create_occurrence(
        &self,
        req: crate::model::CreateOccurrenceRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Occurrence>>;

    async fn batch_create_occurrences(
        &self,
        req: crate::model::BatchCreateOccurrencesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::BatchCreateOccurrencesResponse>>;

    async fn update_occurrence(
        &self,
        req: crate::model::UpdateOccurrenceRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Occurrence>>;

    async fn get_occurrence_note(
        &self,
        req: crate::model::GetOccurrenceNoteRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Note>>;

    async fn get_note(
        &self,
        req: crate::model::GetNoteRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Note>>;

    async fn list_notes(
        &self,
        req: crate::model::ListNotesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListNotesResponse>>;

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

    async fn create_note(
        &self,
        req: crate::model::CreateNoteRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Note>>;

    async fn batch_create_notes(
        &self,
        req: crate::model::BatchCreateNotesRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::BatchCreateNotesResponse>>;

    async fn update_note(
        &self,
        req: crate::model::UpdateNoteRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Note>>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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