// This file is @generated by prost-build.
/// Request message for SummarizeMaintenances custom method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SummarizeMaintenancesRequest {
    /// Required. The parent of the resource maintenance.
    /// eg. `projects/123/locations/*`
    #[prost(string, tag = "10006")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of resource maintenances to send per page. The default
    /// page size is 20 and the maximum is 1000.
    #[prost(int32, tag = "10505")]
    pub page_size: i32,
    /// The page token: If the next_page_token from a previous response
    /// is provided, this request will send the subsequent page.
    #[prost(string, tag = "10506")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter the list as specified in <https://google.aip.dev/160.>
    /// Supported fields include:
    ///
    /// * state
    /// * resource.location
    /// * resource.resourceName
    /// * resource.type
    /// * maintenance.maintenanceName
    /// * maintenanceStartTime
    /// * maintenanceCompleteTime
    ///   Examples:
    /// * state="SCHEDULED"
    /// * resource.location="us-central1-c"
    /// * resource.resourceName=~"\*/instance-20241212-211259"
    /// * maintenanceStartTime>"2000-10-11T20:44:51Z"
    /// * state="SCHEDULED" OR resource.type="compute.googleapis.com/Instance"
    /// * maintenance.maitenanceName="eb3b709c-9ca1-5472-9fb6-800a3849eda1" AND
    ///   maintenanceCompleteTime>"2000-10-11T20:44:51Z"
    #[prost(string, tag = "10507")]
    pub filter: ::prost::alloc::string::String,
    /// Order results as specified in <https://google.aip.dev/132.>
    #[prost(string, tag = "10508")]
    pub order_by: ::prost::alloc::string::String,
}
/// Request message for SummarizeMaintenances custom method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SummarizeMaintenancesResponse {
    /// The resulting summaries.
    #[prost(message, repeated, tag = "10509")]
    pub maintenances: ::prost::alloc::vec::Vec<MaintenanceSummary>,
    /// If present, the next page token can be provided to a subsequent
    /// SummarizeMaintenances call to list the next page.
    /// If empty, there are no more pages.
    #[prost(string, tag = "10510")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Unordered list. Locations that could not be reached.
    #[prost(string, repeated, tag = "10511")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// MaintenanceSummary contains maintenance statistics calculated based on
/// ResourceMaintenances within the scope: project and location.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MaintenanceSummary {
    /// Output only. The name of the maintenance.
    #[prost(string, tag = "1")]
    pub maintenance_name: ::prost::alloc::string::String,
    /// Output only. The title of the maintenance.
    #[prost(string, tag = "2")]
    pub title: ::prost::alloc::string::String,
    /// Output only. The description of the maintenance.
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    /// Output only. The category of the maintenance event.
    #[prost(enumeration = "MaintenanceCategory", tag = "13")]
    pub category: i32,
    /// Output only. Scheduled start time of the maintenance. The maintenance will
    /// start at `maintenanceScheduledStartTime` or later, with best effort to
    /// finish before `maintenanceScheduledEndTime`.
    #[prost(message, optional, tag = "6")]
    pub maintenance_scheduled_start_time: ::core::option::Option<
        ::prost_types::Timestamp,
    >,
    /// Output only. An estimated (best effort, not guaranteed) end time of the
    /// scheduled maintenance.
    #[prost(message, optional, tag = "7")]
    pub maintenance_scheduled_end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Actual date when the maintenance started. Field present only
    /// after the state changed to `RUNNING`.
    #[prost(message, optional, tag = "8")]
    pub maintenance_start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Actual date when the maintenance successfully completed. Field
    /// present only after the state changed to `SUCCEEDED`.
    #[prost(message, optional, tag = "9")]
    pub maintenance_end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Indicates whether the user has some control over that
    /// maintenance, either proactively before maintenance was scheduled with
    /// maintenance policy or with reactive controls after it was scheduled (see
    /// controls field).
    #[prost(bool, tag = "10")]
    pub user_controllable: bool,
    /// Output only. Control available for that Maintenance (might not be available
    /// for every resource that maintenance is applied to).
    #[prost(message, repeated, tag = "14")]
    pub controls: ::prost::alloc::vec::Vec<MaintenanceControl>,
    /// Output only. Stats is a field of ResourceMaintenance used to aggregate the
    /// stats.
    #[prost(message, repeated, tag = "12")]
    pub stats: ::prost::alloc::vec::Vec<maintenance_summary::Stats>,
}
/// Nested message and enum types in `MaintenanceSummary`.
pub mod maintenance_summary {
    /// Stats indicates the type of aggregate and the corresponding aggregates.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct Stats {
        /// groupBy specifies the type of aggregate.
        /// For example a group_by might be `"state"`
        #[prost(string, tag = "1")]
        pub group_by: ::prost::alloc::string::String,
        /// Aggregates is a list \<group, count> pairs. For example, if the
        /// group_by is `"state"` a possible tuple in the aggregates list could be
        /// "SCHEDULED" : `11`,
        #[prost(message, repeated, tag = "2")]
        pub aggregates: ::prost::alloc::vec::Vec<Aggregate>,
    }
    /// Aggregate is a \<group, count> pair.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Aggregate {
        /// Specifies what specific value of the group_by the count represents. For
        /// example if group_by is `"state"` its corresponding group could be
        /// `"SCHEDULED"`.
        #[prost(string, tag = "1")]
        pub group: ::prost::alloc::string::String,
        /// The count of the group.
        #[prost(int64, tag = "2")]
        pub count: i64,
    }
}
/// ResourceMaintenance is a resource that represents a maintenance operation
/// on a resource.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceMaintenance {
    /// Identifier. The name of the resource_maintenance resource.
    /// Format:
    /// `"projects/{project}/locations/{location}/resourceMaintenance/{resource-maintenance-id}"`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Output only. The resource spec of the resource maintenance.
    #[prost(message, optional, tag = "2")]
    pub resource: ::core::option::Option<resource_maintenance::Resource>,
    /// Output only. The details of the maintenance.
    #[prost(message, optional, tag = "3")]
    pub maintenance: ::core::option::Option<resource_maintenance::Maintenance>,
    /// Output only. The state of the resource maintenance.
    #[prost(enumeration = "resource_maintenance::State", tag = "4")]
    pub state: i32,
    /// Output only. The create time of the resource maintenance.
    #[prost(message, optional, tag = "5")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The update time of the resource maintenance.
    #[prost(message, optional, tag = "6")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the resource maintenance has started.
    #[prost(message, optional, tag = "7")]
    pub maintenance_start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the resource maintenance has completed.
    #[prost(message, optional, tag = "8")]
    pub maintenance_end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the resource maintenance was cancelled.
    #[prost(message, optional, tag = "9")]
    pub maintenance_cancel_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time when the maintenance on the resource was scheduled to
    /// start.
    #[prost(message, optional, tag = "10")]
    pub maintenance_scheduled_start_time: ::core::option::Option<
        ::prost_types::Timestamp,
    >,
    /// Output only. The time when the maintenance on the resource was scheduled to
    /// end.
    #[prost(message, optional, tag = "11")]
    pub maintenance_scheduled_end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Indicates whether the user has some control over that
    /// maintenance, either
    /// proactively before maintenance was scheduled with maintenance policy or
    /// with reactive controls after it was scheduled (see controls field)
    #[prost(bool, tag = "12")]
    pub user_controllable: bool,
    /// Output only. The controls of the maintenance.
    #[prost(message, repeated, tag = "13")]
    pub controls: ::prost::alloc::vec::Vec<MaintenanceControl>,
    /// Optional. The labels on the resource, which can be used for categorization.
    /// similar to Kubernetes resource labels.
    #[prost(map = "string, string", tag = "10401")]
    pub labels: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Optional. Annotations is an unstructured key-value map stored with a
    /// resource that may be set by external tools to store and retrieve arbitrary
    /// metadata. They are not queryable and should be preserved when modifying
    /// objects.
    ///
    /// More info: <https://kubernetes.io/docs/user-guide/annotations>
    #[prost(map = "string, string", tag = "10402")]
    pub annotations: ::std::collections::HashMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// Output only. The unique identifier of the resource. UID is unique in the
    /// time and space for this resource within the scope of the service. It is
    /// typically generated by the server on successful creation of a resource
    /// and must not be changed. UID is used to uniquely identify resources
    /// with resource name reuses. This should be a UUID4.
    #[prost(string, tag = "10201")]
    pub uid: ::prost::alloc::string::String,
    /// Output only. An opaque value that uniquely identifies a version or
    /// generation of a resource. It can be used to confirm that the client
    /// and server agree on the ordering of a resource being written.
    #[prost(string, tag = "10202")]
    pub etag: ::prost::alloc::string::String,
}
/// Nested message and enum types in `ResourceMaintenance`.
pub mod resource_maintenance {
    /// Resource contains information about the resource affected by maintenance.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Resource {
        /// Output only. Name is the reference to the consumer resource affected by
        /// the maintenance. Available values can be found here:
        /// <https://cloud.google.com/asset-inventory/docs/asset-names>
        #[prost(string, tag = "1")]
        pub resource_name: ::prost::alloc::string::String,
        /// Output only. The location of the resource.
        /// Format:
        /// `us-central1`
        #[prost(string, tag = "2")]
        pub location: ::prost::alloc::string::String,
        /// Output only. The type of the resource.
        /// Available values can be found here:
        /// <https://cloud.google.com/asset-inventory/docs/asset-types#supported_resource_types>
        /// Please note that not all the resource types will have their maintenances
        /// reported.
        #[prost(string, tag = "3")]
        pub r#type: ::prost::alloc::string::String,
    }
    /// Maintenance is the maintenance details of a resource's maintenance.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct Maintenance {
        /// Maintenance is the name of the corresponding maintenance resource
        /// following the standard naming scheme: `"{maintenance-id}"`
        #[prost(string, tag = "1")]
        pub maintenance_name: ::prost::alloc::string::String,
        /// Output only. The title of the maintenance.
        #[prost(string, tag = "2")]
        pub title: ::prost::alloc::string::String,
        /// Output only. The description of the maintenance.
        #[prost(string, tag = "3")]
        pub description: ::prost::alloc::string::String,
        /// Output only. The category of the maintenance.
        #[prost(enumeration = "super::MaintenanceCategory", tag = "4")]
        pub category: i32,
    }
    /// State is the state of a resource maintenance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unspecified state.
        Unspecified = 0,
        /// Scheduled for a particular window. For disruptive maintenance it should
        /// respect maintenance policy, i.e. its available windows, exclusions and
        /// notification period.
        Scheduled = 1,
        /// Maintenance is ongoing.
        Running = 2,
        /// No longer planned, typically when other maintenance (e.g. upgrade to
        /// newer version) already happened, or the user skipped the maintenance.
        Cancelled = 3,
        /// Successfully completed.
        Succeeded = 4,
    }
    impl State {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "STATE_UNSPECIFIED",
                Self::Scheduled => "SCHEDULED",
                Self::Running => "RUNNING",
                Self::Cancelled => "CANCELLED",
                Self::Succeeded => "SUCCEEDED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "SCHEDULED" => Some(Self::Scheduled),
                "RUNNING" => Some(Self::Running),
                "CANCELLED" => Some(Self::Cancelled),
                "SUCCEEDED" => Some(Self::Succeeded),
                _ => None,
            }
        }
    }
}
/// The control of the maintenance.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MaintenanceControl {
    /// The control of the resource maintenance.
    #[prost(enumeration = "maintenance_control::Control", tag = "1")]
    pub control: i32,
    /// Indicates whether the control is available only in Service Producer API
    /// (not through Unified Maintenance).
    #[prost(bool, tag = "2")]
    pub is_custom: bool,
    /// Link to Service Producer documentation about maintenance control. Provided
    /// only when `isCustom` is `true`.
    #[prost(string, tag = "3")]
    pub documentation: ::prost::alloc::string::String,
}
/// Nested message and enum types in `MaintenanceControl`.
pub mod maintenance_control {
    /// Sets the type of control supported. comment (as in logs).
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Control {
        /// Unspecified control.
        Unspecified = 0,
        /// Apply control.
        Apply = 1,
        /// Manage policy control.
        ManagePolicy = 2,
        /// Reschedule control.
        Reschedule = 3,
    }
    impl Control {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                Self::Unspecified => "CONTROL_UNSPECIFIED",
                Self::Apply => "APPLY",
                Self::ManagePolicy => "MANAGE_POLICY",
                Self::Reschedule => "RESCHEDULE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "CONTROL_UNSPECIFIED" => Some(Self::Unspecified),
                "APPLY" => Some(Self::Apply),
                "MANAGE_POLICY" => Some(Self::ManagePolicy),
                "RESCHEDULE" => Some(Self::Reschedule),
                _ => None,
            }
        }
    }
}
/// The request structure for the ListResourceMaintenances method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListResourceMaintenancesRequest {
    /// Required. The parent of the resource maintenance.
    #[prost(string, tag = "10006")]
    pub parent: ::prost::alloc::string::String,
    /// The maximum number of resource maintenances to send per page.
    #[prost(int32, tag = "10505")]
    pub page_size: i32,
    /// The page token: If the next_page_token from a previous response
    /// is provided, this request will send the subsequent page.
    #[prost(string, tag = "10506")]
    pub page_token: ::prost::alloc::string::String,
    /// Filter the list as specified in <https://google.aip.dev/160.>
    #[prost(string, tag = "10507")]
    pub filter: ::prost::alloc::string::String,
    /// Order results as specified in <https://google.aip.dev/132.>
    #[prost(string, tag = "10508")]
    pub order_by: ::prost::alloc::string::String,
}
/// The response structure for the ListResourceMaintenances method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListResourceMaintenancesResponse {
    /// The resulting resource maintenances.
    #[prost(message, repeated, tag = "10509")]
    pub resource_maintenances: ::prost::alloc::vec::Vec<ResourceMaintenance>,
    /// If present, the next page token can be provided to a subsequent
    /// ListResourceMaintenances call to list the next page.
    /// If empty, there are no more pages.
    #[prost(string, tag = "10510")]
    pub next_page_token: ::prost::alloc::string::String,
    /// Locations that could not be reached.
    #[prost(string, repeated, tag = "10511")]
    pub unreachable: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// The request structure for the GetResourceMaintenance method.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetResourceMaintenanceRequest {
    /// Required. The resource name of the resource within a service.
    #[prost(string, tag = "10001")]
    pub name: ::prost::alloc::string::String,
}
/// The Category of the maintenance.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MaintenanceCategory {
    /// Unspecified category.
    Unspecified = 0,
    /// Infrastructure maintenance events are times that Google Cloud performs
    /// regular maintenance on network equipment e.g. Google Cloud Interconnect
    /// These events are usually scheduled in advance and we provide
    /// notification, when possible, so that users can plan for the
    /// infrastructure maintenance event and prevent downtime. Infrastructure
    /// maintenance events don't have a set interval between occurrences, but
    /// generally occur several times a year.
    Infrastructure = 1,
    /// Updates that can include bug fixes, changes, or new features that are
    /// backward compatible with existing versions (including patches).
    /// Some SPs allow users to control the scheduling of these maintenance
    /// events using maintenance windows and/or deny maintenance features.
    ServiceUpdate = 3,
}
impl MaintenanceCategory {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "MAINTENANCE_CATEGORY_UNSPECIFIED",
            Self::Infrastructure => "INFRASTRUCTURE",
            Self::ServiceUpdate => "SERVICE_UPDATE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MAINTENANCE_CATEGORY_UNSPECIFIED" => Some(Self::Unspecified),
            "INFRASTRUCTURE" => Some(Self::Infrastructure),
            "SERVICE_UPDATE" => Some(Self::ServiceUpdate),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod maintenance_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Unified Maintenance service
    #[derive(Debug, Clone)]
    pub struct MaintenanceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl MaintenanceClient<tonic::transport::Channel> {
        /// Attempt to create a new client by connecting to a given endpoint.
        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> MaintenanceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::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,
        ) -> MaintenanceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::Body>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::Body>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            MaintenanceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Retrieves the statistics of a specific maintenance.
        pub async fn summarize_maintenances(
            &mut self,
            request: impl tonic::IntoRequest<super::SummarizeMaintenancesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SummarizeMaintenancesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.maintenance.api.v1beta.Maintenance/SummarizeMaintenances",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.maintenance.api.v1beta.Maintenance",
                        "SummarizeMaintenances",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieve a collection of resource maintenances.
        pub async fn list_resource_maintenances(
            &mut self,
            request: impl tonic::IntoRequest<super::ListResourceMaintenancesRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListResourceMaintenancesResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.maintenance.api.v1beta.Maintenance/ListResourceMaintenances",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.maintenance.api.v1beta.Maintenance",
                        "ListResourceMaintenances",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Retrieve a single resource maintenance.
        pub async fn get_resource_maintenance(
            &mut self,
            request: impl tonic::IntoRequest<super::GetResourceMaintenanceRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ResourceMaintenance>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::unknown(
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.cloud.maintenance.api.v1beta.Maintenance/GetResourceMaintenance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.maintenance.api.v1beta.Maintenance",
                        "GetResourceMaintenance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
