// This file is @generated by prost-build.
/// Request message for DestinationService.SearchDestinations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDestinationsRequest {
    /// Optional. The travel modes to filter navigation points for. This influences
    /// the `navigation_points` field returned in the response. If empty,
    /// navigation points of all travel modes are returned.
    #[prost(
        enumeration = "navigation_point::TravelMode",
        repeated,
        packed = "false",
        tag = "5"
    )]
    pub travel_modes: ::prost::alloc::vec::Vec<i32>,
    /// Optional. Language in which the results should be returned.
    #[prost(string, tag = "6")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Region code. The region code, specified as a ccTLD ("top-level
    /// domain") two-character value. The parameter affects results based on
    /// applicable law. This parameter also influences, but not fully restricts,
    /// results from the service.
    #[prost(string, tag = "7")]
    pub region_code: ::prost::alloc::string::String,
    /// Query for the primary destination. This can be either a place, a fully
    /// specified address, or a LatLng location. Some places and addresses with
    /// minimal information won't be able to be turned into a destination.
    ///
    /// The destinations are built around the specified primary query.
    ///
    /// Note: only places and addresses that can have a navigational destination
    /// are supported. For example, a place that represents a house or an apartment
    /// complex can be used as the primary query, but places that represent a
    /// locality or an administrative area cannot be used as the primary query.
    #[prost(oneof = "search_destinations_request::PrimaryQuery", tags = "1, 2, 3")]
    pub primary_query: ::core::option::Option<search_destinations_request::PrimaryQuery>,
}
/// Nested message and enum types in `SearchDestinationsRequest`.
pub mod search_destinations_request {
    /// The street address that you want to search for. Specify addresses in
    /// accordance with the format used by the national postal service of the
    /// country concerned.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AddressQuery {
        /// The address query.
        #[prost(oneof = "address_query::Kind", tags = "1, 2")]
        pub kind: ::core::option::Option<address_query::Kind>,
    }
    /// Nested message and enum types in `AddressQuery`.
    pub mod address_query {
        /// The address query.
        #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
        pub enum Kind {
            /// A street address in postal address format.
            #[prost(message, tag = "1")]
            Address(super::super::super::super::super::r#type::PostalAddress),
            /// A street address formatted as a single line.
            #[prost(string, tag = "2")]
            AddressQuery(::prost::alloc::string::String),
        }
    }
    /// A location query to identify a nearby primary destination.
    ///
    /// Note: if the location query is within a building that contains subpremises,
    /// it is possible that the returned primary place is a subpremise. In these
    /// cases, the `containing_places` field will include the building.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct LocationQuery {
        /// Optional. Filters to apply to destination candidates.
        #[prost(message, optional, tag = "2")]
        pub place_filter: ::core::option::Option<location_query::PlaceFilter>,
        /// The location query.
        #[prost(oneof = "location_query::Kind", tags = "1")]
        pub kind: ::core::option::Option<location_query::Kind>,
    }
    /// Nested message and enum types in `LocationQuery`.
    pub mod location_query {
        /// Filters to apply to destination candidates.
        #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
        pub struct PlaceFilter {
            /// Optional. If specified, all destinations are guaranteed to have a
            /// primary place with this structure type. This can result in filtering
            /// out some destinations, or in coarsening/refining the returned
            /// destinations.
            ///
            /// For example, if `GROUNDS` is specified, all returned destinations will
            /// have a primary place with the `GROUNDS` structure type. This can
            /// result in filtering out some destinations that are not part of a
            /// grounds, or in coarsening the returned destinations to the grounds
            /// level.
            ///
            /// Another use of this field is to more easily extract building display
            /// polygons. For example, if `BUILDING` is specified, the primary place's
            /// display polygon will be for the building at the specified location.
            #[prost(enumeration = "super::super::place_view::StructureType", tag = "2")]
            pub structure_type: i32,
            /// Optional. If specified, only returns destinations that meet the
            /// corresponding addressability criteria.
            #[prost(enumeration = "place_filter::Addressability", tag = "3")]
            pub addressability: i32,
        }
        /// Nested message and enum types in `PlaceFilter`.
        pub mod place_filter {
            /// Defines options for addressability filtering. New values may be added
            /// in the future.
            #[derive(
                Clone,
                Copy,
                Debug,
                PartialEq,
                Eq,
                Hash,
                PartialOrd,
                Ord,
                ::prost::Enumeration
            )]
            #[repr(i32)]
            pub enum Addressability {
                /// When unspecified, the service will choose a sensible default.
                Unspecified = 0,
                /// Addressability is not a filtering criteria. Destinations are returned
                /// regardless of their addressability.
                Any = 1,
                /// All destinations returned will have a primary place with a street
                /// level address or name.
                Primary = 2,
                /// All destinations returned will have either a primary place or a
                /// subdestination with a street level address or name.
                Weak = 3,
            }
            impl Addressability {
                /// 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 => "ADDRESSABILITY_UNSPECIFIED",
                        Self::Any => "ANY",
                        Self::Primary => "PRIMARY",
                        Self::Weak => "WEAK",
                    }
                }
                /// Creates an enum from field names used in the ProtoBuf definition.
                pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
                    match value {
                        "ADDRESSABILITY_UNSPECIFIED" => Some(Self::Unspecified),
                        "ANY" => Some(Self::Any),
                        "PRIMARY" => Some(Self::Primary),
                        "WEAK" => Some(Self::Weak),
                        _ => None,
                    }
                }
            }
        }
        /// The location query.
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum Kind {
            /// A precise LatLng location.
            #[prost(message, tag = "1")]
            Location(super::super::super::super::super::r#type::LatLng),
        }
    }
    /// Query for the primary destination. This can be either a place, a fully
    /// specified address, or a LatLng location. Some places and addresses with
    /// minimal information won't be able to be turned into a destination.
    ///
    /// The destinations are built around the specified primary query.
    ///
    /// Note: only places and addresses that can have a navigational destination
    /// are supported. For example, a place that represents a house or an apartment
    /// complex can be used as the primary query, but places that represent a
    /// locality or an administrative area cannot be used as the primary query.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PrimaryQuery {
        /// The resource name of a place, in `places/{place_id}` format.
        #[prost(string, tag = "1")]
        Place(::prost::alloc::string::String),
        /// A street address.
        #[prost(message, tag = "2")]
        AddressQuery(AddressQuery),
        /// A precise location.
        #[prost(message, tag = "3")]
        LocationQuery(LocationQuery),
    }
}
/// Response message for DestinationService.SearchDestinations.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchDestinationsResponse {
    /// A list of destinations.
    ///
    /// The service returns one result if a primary destination can be
    /// unambiguously identified from the primary query. Otherwise, the service
    /// might return multiple results for disambiguation or zero results.
    #[prost(message, repeated, tag = "1")]
    pub destinations: ::prost::alloc::vec::Vec<Destination>,
}
/// A destination. This includes the primary place, related places,
/// entrances, and navigation points.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Destination {
    /// The primary place identified by the `primary_query` in the request.
    #[prost(message, optional, tag = "1")]
    pub primary: ::core::option::Option<PlaceView>,
    /// The less precise places that the primary place is contained by.
    /// For example, the apartment complex that contains this building.
    #[prost(message, repeated, tag = "2")]
    pub containing_places: ::prost::alloc::vec::Vec<PlaceView>,
    /// More precise sub-destinations of the primary place. For example, units
    /// contained in a building.
    ///
    /// Note: compared to the
    /// [SubDestination](/maps/documentation/places/web-service/reference/rest/v1/places#SubDestination)
    /// returned by the Places API, this list of sub-destinations is more
    /// exhaustive, and each sub-destination contains more information.
    #[prost(message, repeated, tag = "3")]
    pub sub_destinations: ::prost::alloc::vec::Vec<PlaceView>,
    /// Landmarks that can be used to communicate where the destination is
    /// or help with arrival.
    #[prost(message, repeated, tag = "4")]
    pub landmarks: ::prost::alloc::vec::Vec<Landmark>,
    /// Entrances for this destination.
    #[prost(message, repeated, tag = "5")]
    pub entrances: ::prost::alloc::vec::Vec<Entrance>,
    /// Navigation points for this destination.
    #[prost(message, repeated, tag = "6")]
    pub navigation_points: ::prost::alloc::vec::Vec<NavigationPoint>,
}
/// Represents a view of a
/// [Place](<https://developers.google.com/maps/documentation/places/web-service/reference/rest/v1/places#resource:-place>)
/// in the Places API. It also provides additional information specific to
/// destinations, such as the structure type and the display polygon.
///
/// In some cases, a `PlaceView` with the same place ID might differ from what
/// is being returned by the Places API for the `types` and
/// `display_name` fields.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlaceView {
    /// This Place's resource name, in `places/{placeId}` format.  Can be used to
    /// look up the Place.
    #[prost(string, tag = "1")]
    pub place: ::prost::alloc::string::String,
    /// The unique identifier of a place.
    #[prost(string, tag = "2")]
    pub place_id: ::prost::alloc::string::String,
    /// Human readable place description. For example, "Gate B", "McDonalds"
    #[prost(message, optional, tag = "3")]
    pub display_name: ::core::option::Option<super::super::super::r#type::LocalizedText>,
    /// The primary place type of this place. See
    /// <https://developers.google.com/maps/documentation/places/web-service/place-types>
    /// for the list of possible values.
    ///
    /// Note: This field is not always populated. Be prepared to use the `types`
    /// field in such situations.
    #[prost(string, tag = "4")]
    pub primary_type: ::prost::alloc::string::String,
    /// All associated place types of this place. See
    /// <https://developers.google.com/maps/documentation/places/web-service/place-types>
    /// for the list of possible values.
    #[prost(string, repeated, tag = "5")]
    pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// One line address.
    #[prost(string, tag = "6")]
    pub formatted_address: ::prost::alloc::string::String,
    /// Structured address.
    #[prost(message, optional, tag = "7")]
    pub postal_address: ::core::option::Option<
        super::super::super::r#type::PostalAddress,
    >,
    /// The type of structure corresponding to this place.
    #[prost(enumeration = "place_view::StructureType", tag = "8")]
    pub structure_type: i32,
    /// The location of this place. For places with display polygons, this can
    /// represent a good spot to put a marker on the map.
    #[prost(message, optional, tag = "9")]
    pub location: ::core::option::Option<super::super::super::r#type::LatLng>,
    /// The polygon outline of the place in GeoJSON format, using the RFC 7946
    /// format: <https://datatracker.ietf.org/doc/html/rfc7946#section-3.1.6.>
    ///
    /// Note: The RFC 7946 format supports MultiPolygons, so one `display_polygon`
    /// object can represent multiple polygons.
    #[prost(message, optional, tag = "10")]
    pub display_polygon: ::core::option::Option<::prost_types::Struct>,
}
/// Nested message and enum types in `PlaceView`.
pub mod place_view {
    /// The type of structure that this place represents.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum StructureType {
        /// Not used.
        Unspecified = 0,
        /// A point location.
        Point = 1,
        /// A sub-section of a building.
        Section = 2,
        /// A building.
        Building = 3,
        /// A large area that typically contains multiple buildings, such as a
        /// university campus, an apartment complex, or a shopping mall.
        Grounds = 4,
    }
    impl StructureType {
        /// 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 => "STRUCTURE_TYPE_UNSPECIFIED",
                Self::Point => "POINT",
                Self::Section => "SECTION",
                Self::Building => "BUILDING",
                Self::Grounds => "GROUNDS",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STRUCTURE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "POINT" => Some(Self::Point),
                "SECTION" => Some(Self::Section),
                "BUILDING" => Some(Self::Building),
                "GROUNDS" => Some(Self::Grounds),
                _ => None,
            }
        }
    }
}
/// An entrance is a single latitude/longitude coordinate pair that defines the
/// location of an entry and exit point for a place.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Entrance {
    /// The location of the entrance.
    #[prost(message, optional, tag = "2")]
    pub location: ::core::option::Option<super::super::super::r#type::LatLng>,
    /// A list of tags that describe the entrance.
    #[prost(enumeration = "entrance::Tag", repeated, tag = "3")]
    pub tags: ::prost::alloc::vec::Vec<i32>,
    /// The structure this entrance is physically located on, in
    /// `places/{place_id}` format.
    #[prost(string, tag = "4")]
    pub place: ::prost::alloc::string::String,
}
/// Nested message and enum types in `Entrance`.
pub mod entrance {
    /// Characteristics that describe an entrance.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Tag {
        /// Not used.
        Unspecified = 0,
        /// The entrance likely provides physical access to the primary place in
        /// the returned destination. A place can have multiple preferred entrances.
        /// If an entrance does not have this tag, it means the entrance is
        /// physically on the same building as the primary place, but does not
        /// necessarily provide access to the place.
        ///
        /// For example, if the primary place is a restaurant in a strip mall, the
        /// "PREFERRED" entrances will be the ones that likely lead into the
        /// restaurant itself, while the other returned entrances will be other
        /// entrances for the building, such as entrances into other restaurants in
        /// the strip mall.
        ///
        /// If the primary place is a building itself, the `PREFERRED` entrances
        /// will be the ones that lead into the "main" part of the building. For
        /// example, in a shopping center the `PREFERRED` entrances will be the ones
        /// that allow access to the main foyer area, but if an entrance only
        /// provides access to a store on the side of the building, it won't be a
        /// `PREFERRED` entrance.
        ///
        /// Note: a `PREFERRED` entrance might not provide access to the primary
        /// place, and a non-`PREFERRED` entrance might provide access to the
        /// primary place.
        Preferred = 1,
    }
    impl Tag {
        /// 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 => "TAG_UNSPECIFIED",
                Self::Preferred => "PREFERRED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TAG_UNSPECIFIED" => Some(Self::Unspecified),
                "PREFERRED" => Some(Self::Preferred),
                _ => None,
            }
        }
    }
}
/// A navigation point is a location next to a road where navigation can end.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NavigationPoint {
    /// Output only. A token that can be used to identify this navigation point.
    #[prost(string, tag = "1")]
    pub navigation_point_token: ::prost::alloc::string::String,
    /// The display name of this navigation point. For example, "5th Ave" or "Gate
    /// B".
    #[prost(message, optional, tag = "2")]
    pub display_name: ::core::option::Option<super::super::super::r#type::LocalizedText>,
    /// A point next to the road segment where navigation should end. The point is
    /// intentionally slightly offset from the road's centerline to clearly mark
    /// the side of the road where the place is located.
    #[prost(message, optional, tag = "3")]
    pub location: ::core::option::Option<super::super::super::r#type::LatLng>,
    /// Travel modes that are appropriate for this navigation point.
    #[prost(enumeration = "navigation_point::TravelMode", repeated, tag = "4")]
    pub travel_modes: ::prost::alloc::vec::Vec<i32>,
    /// Lists `usages` supported by this navigation point. If empty, it does not
    /// necessarily mean its usage is restricted in any way. All navigation
    /// points can be used for general navigation.
    #[prost(enumeration = "navigation_point::Usage", repeated, tag = "5")]
    pub usages: ::prost::alloc::vec::Vec<i32>,
}
/// Nested message and enum types in `NavigationPoint`.
pub mod navigation_point {
    /// Travel modes that are appropriate for this navigation point.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum TravelMode {
        /// Not used.
        Unspecified = 0,
        /// Suitable for driving.
        Drive = 1,
        /// Suitable for walking.
        Walk = 2,
    }
    impl TravelMode {
        /// 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 => "TRAVEL_MODE_UNSPECIFIED",
                Self::Drive => "DRIVE",
                Self::Walk => "WALK",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TRAVEL_MODE_UNSPECIFIED" => Some(Self::Unspecified),
                "DRIVE" => Some(Self::Drive),
                "WALK" => Some(Self::Walk),
                _ => None,
            }
        }
    }
    /// Usages supported by this navigation point.
    /// New values may be added in the future.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Usage {
        /// Not used.
        Unspecified = 0,
        /// Indicates that the usage type is unknown.
        Unknown = 1,
        /// Suitable for dropping off a passenger. For example, a rideshare drop off
        /// location.
        Dropoff = 2,
        /// Suitable for picking up a passenger. For example, a rideshare pick up
        /// location.
        Pickup = 3,
        /// Suitable for parking. For example, within a parking lot.
        Parking = 4,
    }
    impl Usage {
        /// 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 => "USAGE_UNSPECIFIED",
                Self::Unknown => "UNKNOWN",
                Self::Dropoff => "DROPOFF",
                Self::Pickup => "PICKUP",
                Self::Parking => "PARKING",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "USAGE_UNSPECIFIED" => Some(Self::Unspecified),
                "UNKNOWN" => Some(Self::Unknown),
                "DROPOFF" => Some(Self::Dropoff),
                "PICKUP" => Some(Self::Pickup),
                "PARKING" => Some(Self::Parking),
                _ => None,
            }
        }
    }
}
/// Landmarks are used to communicate where the destination is or help with
/// arriving at the destination.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Landmark {
    /// A human-readable description of how the destination relates to the
    /// landmark. For example: "Near the Empire State Building" or "Across from
    /// the White House".
    #[prost(message, optional, tag = "2")]
    pub relational_description: ::core::option::Option<
        super::super::super::r#type::LocalizedText,
    >,
    /// Tags that describe how the landmark can be used in the context of the
    /// destination.
    #[prost(enumeration = "landmark::Tag", repeated, tag = "3")]
    pub tags: ::prost::alloc::vec::Vec<i32>,
    /// Output only. The straight-line distance from this landmark to the
    /// destination in meters.
    #[prost(double, tag = "4")]
    pub straight_line_distance_meters: f64,
    /// Output only. The road-network distance from this landmark to the
    /// destination in meters.
    #[prost(double, tag = "5")]
    pub travel_distance_meters: f64,
    /// The landmark.
    #[prost(oneof = "landmark::Landmark", tags = "1")]
    pub landmark: ::core::option::Option<landmark::Landmark>,
}
/// Nested message and enum types in `Landmark`.
pub mod landmark {
    /// The list of all possible tags that describe how a landmark can be used in
    /// the context of a destination.
    ///
    /// If an address has both the `ADDRESS` and `ARRIVAL` tags, it means the
    /// landmark is both locally prominent and close to the destination.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Tag {
        /// Not used.
        Unspecified = 0,
        /// A locally prominent place that can be used to identify the general
        /// location of the destination. Typically within a few hundred meters of the
        /// destination. These are similar to the landmarks returned by the
        /// Address Descriptors feature of the Geocoding API:
        /// <https://developers.google.com/maps/documentation/geocoding/address-descriptors/requests-address-descriptors.>
        Address = 1,
        /// A place that can be used to help arrive at the destination. Useful for
        /// navigation once you are close to the destination. For example, this
        /// landmark might be a place that is across the street from the destination.
        /// A landmark with this tag is typically closer to the destination than
        /// landmarks with the `ADDRESS` tag.
        Arrival = 2,
    }
    impl Tag {
        /// 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 => "TAG_UNSPECIFIED",
                Self::Address => "ADDRESS",
                Self::Arrival => "ARRIVAL",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "TAG_UNSPECIFIED" => Some(Self::Unspecified),
                "ADDRESS" => Some(Self::Address),
                "ARRIVAL" => Some(Self::Arrival),
                _ => None,
            }
        }
    }
    /// The landmark.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Landmark {
        /// The place that represents this landmark.
        #[prost(message, tag = "1")]
        Place(super::PlaceView),
    }
}
/// Generated client implementations.
pub mod destination_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A service for retrieving destinations.
    ///
    /// A destination provides hierarchical context about a place, which
    /// allows you to, for example, find apartment buildings within a larger
    /// apartment complex and vice versa. It also provides navigation points suitable
    /// for use cases such as ridesharing or delivery.
    #[derive(Debug, Clone)]
    pub struct DestinationServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl DestinationServiceClient<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> DestinationServiceClient<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,
        ) -> DestinationServiceClient<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,
        {
            DestinationServiceClient::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
        }
        /// This method performs a destination lookup and returns a list of
        /// destinations.
        pub async fn search_destinations(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchDestinationsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchDestinationsResponse>,
            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.maps.geocode.v4.DestinationService/SearchDestinations",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.geocode.v4.DestinationService",
                        "SearchDestinations",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Request message for GeocodeService.GeocodeAddress.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeocodeAddressRequest {
    /// Optional. The region to search. This location serves as a bias which means
    /// results around the given location are preferred.
    #[prost(message, optional, tag = "3")]
    pub location_bias: ::core::option::Option<geocode_address_request::LocationBias>,
    /// Optional. Language in which the results should be returned.
    #[prost(string, tag = "4")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Region code. The region code, specified as a ccTLD ("top-level
    /// domain") two-character value. The parameter affects results based on
    /// applicable law. This parameter will also influence, but not fully restrict,
    /// results from the service.
    #[prost(string, tag = "5")]
    pub region_code: ::prost::alloc::string::String,
    /// The address to geocode.
    #[prost(oneof = "geocode_address_request::AddressInput", tags = "1, 2")]
    pub address_input: ::core::option::Option<geocode_address_request::AddressInput>,
}
/// Nested message and enum types in `GeocodeAddressRequest`.
pub mod geocode_address_request {
    /// The region to search. This location serves as a bias which means results
    /// around the given location are preferred.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct LocationBias {
        /// Types of location bias.
        #[prost(oneof = "location_bias::Type", tags = "1")]
        pub r#type: ::core::option::Option<location_bias::Type>,
    }
    /// Nested message and enum types in `LocationBias`.
    pub mod location_bias {
        /// Types of location bias.
        #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
        pub enum Type {
            /// A rectangular box defined by northeast and southwest corner.
            /// `rectangle.high()` must be the northeast point of the rectangle
            /// viewport. `rectangle.low()` must be the southwest point of the
            /// rectangle viewport. `rectangle.low().latitude()` cannot be greater than
            /// `rectangle.high().latitude()`. This will result in an empty latitude
            /// range. A rectangle viewport cannot be wider than 180 degrees.
            #[prost(message, tag = "1")]
            Rectangle(super::super::super::super::super::geo::r#type::Viewport),
        }
    }
    /// The address to geocode.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum AddressInput {
        /// The unstructured address to geocode.
        #[prost(string, tag = "1")]
        AddressQuery(::prost::alloc::string::String),
        /// The structured address to geocode in postal address format.
        #[prost(message, tag = "2")]
        Address(super::super::super::super::r#type::PostalAddress),
    }
}
/// Request message for GeocodeService.GeocodeLocation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeocodeLocationRequest {
    /// Optional. Language in which the results should be returned.
    #[prost(string, tag = "3")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Region code. The region code, specified as a ccTLD ("top-level
    /// domain") two-character value. The parameter affects results based on
    /// applicable law.
    #[prost(string, tag = "4")]
    pub region_code: ::prost::alloc::string::String,
    /// Optional. A set of type tags to restrict the results. Results that do not
    /// have any of the specified types are removed.
    ///
    /// For the complete list of possible values, see Table A and Table B at
    /// <https://developers.google.com/maps/documentation/places/web-service/place-types.>
    #[prost(string, repeated, tag = "5")]
    pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. A filter of one or more location granularity enums.
    #[prost(
        enumeration = "geocode_result::Granularity",
        repeated,
        packed = "false",
        tag = "6"
    )]
    pub granularity: ::prost::alloc::vec::Vec<i32>,
    /// The location to geocode.
    #[prost(oneof = "geocode_location_request::LocationInput", tags = "1, 2")]
    pub location_input: ::core::option::Option<geocode_location_request::LocationInput>,
}
/// Nested message and enum types in `GeocodeLocationRequest`.
pub mod geocode_location_request {
    /// The location to geocode.
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum LocationInput {
        /// The location in the format of "lat,lng" string. For example,
        /// "64.7611872,-18.4705364".
        #[prost(string, tag = "1")]
        LocationQuery(::prost::alloc::string::String),
        /// The location in the structured format.
        #[prost(message, tag = "2")]
        Location(super::super::super::super::r#type::LatLng),
    }
}
/// Request message for GeocodeService.GeocodePlace.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GeocodePlaceRequest {
    /// Required. Place identifier to geocode in the format of places/{place}.
    #[prost(string, tag = "1")]
    pub place: ::prost::alloc::string::String,
    /// Optional. Language in which the results should be returned.
    #[prost(string, tag = "2")]
    pub language_code: ::prost::alloc::string::String,
    /// Optional. Region code. The region code, specified as a ccTLD ("top-level
    /// domain") two-character value. The parameter affects results based on
    /// applicable law.
    #[prost(string, tag = "3")]
    pub region_code: ::prost::alloc::string::String,
}
/// Plus code (<http://plus.codes>) is a location reference with two formats:
/// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
/// and compound code, replacing the prefix with a reference location.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PlusCode {
    /// Place's global (full) code, such as "9FWM33GV+HQ", representing an
    /// 1/8000 by 1/8000 degree area (~14 by 14 meters).
    #[prost(string, tag = "1")]
    pub global_code: ::prost::alloc::string::String,
    /// Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
    /// the suffix of the global code and replacing the prefix with a formatted
    /// name of a reference entity.
    #[prost(string, tag = "2")]
    pub compound_code: ::prost::alloc::string::String,
}
/// A geocode result contains geographic information about a place.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeocodeResult {
    /// This Place's resource name, in `places/{placeId}` format.  Can be used to
    /// look up the Place.
    #[prost(string, tag = "1")]
    pub place: ::prost::alloc::string::String,
    /// The unique identifier of a place.
    #[prost(string, tag = "2")]
    pub place_id: ::prost::alloc::string::String,
    /// The latlng of this address.
    #[prost(message, optional, tag = "3")]
    pub location: ::core::option::Option<super::super::super::r#type::LatLng>,
    /// The granularity of the location.
    #[prost(enumeration = "geocode_result::Granularity", tag = "4")]
    pub granularity: i32,
    /// A viewport suitable for displaying the geocode result.
    #[prost(message, optional, tag = "5")]
    pub viewport: ::core::option::Option<super::super::super::geo::r#type::Viewport>,
    /// A bounding box for the address.
    #[prost(message, optional, tag = "6")]
    pub bounds: ::core::option::Option<super::super::super::geo::r#type::Viewport>,
    /// The one line formatted address.
    #[prost(string, tag = "7")]
    pub formatted_address: ::prost::alloc::string::String,
    /// The address in postal address format.
    #[prost(message, optional, tag = "8")]
    pub postal_address: ::core::option::Option<
        super::super::super::r#type::PostalAddress,
    >,
    /// Repeated components for each locality level.
    #[prost(message, repeated, tag = "9")]
    pub address_components: ::prost::alloc::vec::Vec<geocode_result::AddressComponent>,
    /// Complete list of localities contained in the postal code.
    ///
    /// This is only populated when the result is of type "postal_code".
    #[prost(message, repeated, tag = "11")]
    pub postal_code_localities: ::prost::alloc::vec::Vec<
        super::super::super::r#type::LocalizedText,
    >,
    /// A set of type tags for this result. For
    /// example, "political" and "administrative_area".
    ///
    /// For the complete list of possible values, see Table A and Table B at
    /// <https://developers.google.com/maps/documentation/places/web-service/place-types.>
    #[prost(string, repeated, tag = "12")]
    pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Plus code of the location in this geocode.
    #[prost(message, optional, tag = "13")]
    pub plus_code: ::core::option::Option<PlusCode>,
}
/// Nested message and enum types in `GeocodeResult`.
pub mod geocode_result {
    /// The structured components that form the formatted address, if this
    /// information is available.
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
    pub struct AddressComponent {
        /// The full text description or name of the address component. For example,
        /// an address component for the country Australia may have a long name of
        /// "Australia".
        #[prost(string, tag = "1")]
        pub long_text: ::prost::alloc::string::String,
        /// An abbreviated textual name for the address component, if available. For
        /// example, an address component for the country of Australia may have a
        /// short name of "AU".
        #[prost(string, tag = "2")]
        pub short_text: ::prost::alloc::string::String,
        /// An array indicating the type(s) of the address component.
        ///
        /// See
        /// <https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types>
        /// for more details.
        #[prost(string, repeated, tag = "3")]
        pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
        /// The language used to format this component, in CLDR notation.
        #[prost(string, tag = "4")]
        pub language_code: ::prost::alloc::string::String,
    }
    /// The granularity of the location.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Granularity {
        /// Do not use.
        Unspecified = 0,
        /// The non-interpolated location of an actual plot of land corresponding
        /// to the matched address.
        Rooftop = 1,
        /// Interpolated from a range of street numbers. For example, if we know
        /// that a segment of Amphitheatre Pkwy contains numbers 1600 - 1699, then
        /// 1650 might be placed halfway between its endpoints.
        RangeInterpolated = 2,
        /// The geometric center of a feature for which we have polygonal data.
        GeometricCenter = 3,
        /// Everything else.
        Approximate = 4,
    }
    impl Granularity {
        /// 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 => "GRANULARITY_UNSPECIFIED",
                Self::Rooftop => "ROOFTOP",
                Self::RangeInterpolated => "RANGE_INTERPOLATED",
                Self::GeometricCenter => "GEOMETRIC_CENTER",
                Self::Approximate => "APPROXIMATE",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "GRANULARITY_UNSPECIFIED" => Some(Self::Unspecified),
                "ROOFTOP" => Some(Self::Rooftop),
                "RANGE_INTERPOLATED" => Some(Self::RangeInterpolated),
                "GEOMETRIC_CENTER" => Some(Self::GeometricCenter),
                "APPROXIMATE" => Some(Self::Approximate),
                _ => None,
            }
        }
    }
}
/// Response message for
/// \[GeocodeService.GeocodeAddress\]\[google.maps.geocode.v4.GeocodeService.GeocodeAddress\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeocodeAddressResponse {
    /// The geocoding result.
    #[prost(message, repeated, tag = "1")]
    pub results: ::prost::alloc::vec::Vec<GeocodeResult>,
}
/// Response message for
/// \[GeocodeService.GeocodeLocation\]\[google.maps.geocode.v4.GeocodeService.GeocodeLocation\].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GeocodeLocationResponse {
    /// The geocoding result.
    #[prost(message, repeated, tag = "1")]
    pub results: ::prost::alloc::vec::Vec<GeocodeResult>,
    /// Plus code of the location in the request.
    #[prost(message, optional, tag = "2")]
    pub plus_code: ::core::option::Option<PlusCode>,
}
/// Generated client implementations.
pub mod geocode_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value,
    )]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// A service for performing geocoding.
    #[derive(Debug, Clone)]
    pub struct GeocodeServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl GeocodeServiceClient<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> GeocodeServiceClient<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,
        ) -> GeocodeServiceClient<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,
        {
            GeocodeServiceClient::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
        }
        /// This method performs an address geocode, which maps an address to a
        /// LatLng. It also provides structured information about the address.
        pub async fn geocode_address(
            &mut self,
            request: impl tonic::IntoRequest<super::GeocodeAddressRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GeocodeAddressResponse>,
            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.maps.geocode.v4.GeocodeService/GeocodeAddress",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.geocode.v4.GeocodeService",
                        "GeocodeAddress",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// This method performs a location geocode, which maps a LatLng to an
        /// address. It also provides structured information about the address.
        pub async fn geocode_location(
            &mut self,
            request: impl tonic::IntoRequest<super::GeocodeLocationRequest>,
        ) -> std::result::Result<
            tonic::Response<super::GeocodeLocationResponse>,
            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.maps.geocode.v4.GeocodeService/GeocodeLocation",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.geocode.v4.GeocodeService",
                        "GeocodeLocation",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// This method performs a geocode lookup using a place ID.
        pub async fn geocode_place(
            &mut self,
            request: impl tonic::IntoRequest<super::GeocodePlaceRequest>,
        ) -> std::result::Result<tonic::Response<super::GeocodeResult>, 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.maps.geocode.v4.GeocodeService/GeocodePlace",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.maps.geocode.v4.GeocodeService",
                        "GeocodePlace",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
