google-maps-weather-v1 1.1.0

Google Cloud Client Libraries for Rust - Weather API
Documentation
// Copyright 2026 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::Weather].
#[async_trait::async_trait]
pub trait Weather: std::fmt::Debug + Send + Sync {
    async fn lookup_current_conditions(
        &self,
        req: crate::model::LookupCurrentConditionsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::LookupCurrentConditionsResponse>>;

    async fn lookup_forecast_hours(
        &self,
        req: crate::model::LookupForecastHoursRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::LookupForecastHoursResponse>>;

    async fn lookup_forecast_days(
        &self,
        req: crate::model::LookupForecastDaysRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::LookupForecastDaysResponse>>;

    async fn lookup_history_hours(
        &self,
        req: crate::model::LookupHistoryHoursRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::LookupHistoryHoursResponse>>;

    async fn lookup_public_alerts(
        &self,
        req: crate::model::LookupPublicAlertsRequest,
        options: crate::RequestOptions,
    ) -> crate::Result<crate::Response<crate::model::LookupPublicAlertsResponse>>;

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

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

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

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

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

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

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