google-cloud-websecurityscanner-v1 1.7.0

Google Cloud Client Libraries for Rust - Web Security Scanner 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::WebSecurityScanner].
#[async_trait::async_trait]
pub trait WebSecurityScanner: std::fmt::Debug + Send + Sync {
    async fn create_scan_config(
        &self,
        req: crate::model::CreateScanConfigRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanConfig>>;

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

    async fn get_scan_config(
        &self,
        req: crate::model::GetScanConfigRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanConfig>>;

    async fn list_scan_configs(
        &self,
        req: crate::model::ListScanConfigsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListScanConfigsResponse>>;

    async fn update_scan_config(
        &self,
        req: crate::model::UpdateScanConfigRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanConfig>>;

    async fn start_scan_run(
        &self,
        req: crate::model::StartScanRunRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanRun>>;

    async fn get_scan_run(
        &self,
        req: crate::model::GetScanRunRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanRun>>;

    async fn list_scan_runs(
        &self,
        req: crate::model::ListScanRunsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListScanRunsResponse>>;

    async fn stop_scan_run(
        &self,
        req: crate::model::StopScanRunRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ScanRun>>;

    async fn list_crawled_urls(
        &self,
        req: crate::model::ListCrawledUrlsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListCrawledUrlsResponse>>;

    async fn get_finding(
        &self,
        req: crate::model::GetFindingRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::Finding>>;

    async fn list_findings(
        &self,
        req: crate::model::ListFindingsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::ListFindingsResponse>>;

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

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

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

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

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

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

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

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

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

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

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

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

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

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