// This file is @generated by prost-build.
///
/// MetadataKey provides a way to retrieve values from
/// : ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a `key` and a `path`.
///
///
/// For example, consider the following Metadata:
///
/// .. code-block:: yaml
///
/// ```text
/// filter_metadata:
///   envoy.xxx:
///     prop:
///       foo: bar
///       xyz:
///         hello: envoy
/// ```
///
/// The following MetadataKey would retrieve the string value "bar" from the Metadata:
///
/// .. code-block:: yaml
///
/// ```text
/// key: envoy.xxx
/// path:
/// - key: prop
/// - key: foo
/// ```
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct MetadataKey {
    /// The key name of the Metadata from which to retrieve the Struct.
    /// This typically represents a builtin subsystem or custom extension.
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    /// The path used to retrieve a specific Value from the Struct.
    /// This can be either a prefix or a full path, depending on the use case.
    /// For example, `\[prop, xyz\]` would retrieve a struct or `\[prop, foo\]` would retrieve a string
    /// in the example above.
    ///
    /// .. note::
    /// Since only key-type segments are supported, a path cannot specify a list
    /// unless the list is the last segment.
    #[prost(message, repeated, tag = "2")]
    pub path: ::prost::alloc::vec::Vec<metadata_key::PathSegment>,
}
/// Nested message and enum types in `MetadataKey`.
pub mod metadata_key {
    /// Specifies a segment in a path for retrieving values from Metadata.
    /// Currently, only key-based segments (field names) are supported.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct PathSegment {
        #[prost(oneof = "path_segment::Segment", tags = "1")]
        pub segment: ::core::option::Option<path_segment::Segment>,
    }
    /// Nested message and enum types in `PathSegment`.
    pub mod path_segment {
        #[derive(Clone, PartialEq, ::prost::Oneof)]
        pub enum Segment {
            /// If specified, use this key to retrieve the value in a Struct.
            #[prost(string, tag = "1")]
            Key(::prost::alloc::string::String),
        }
    }
}
/// Describes different types of metadata sources.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MetadataKind {
    #[prost(oneof = "metadata_kind::Kind", tags = "1, 2, 3, 4")]
    pub kind: ::core::option::Option<metadata_kind::Kind>,
}
/// Nested message and enum types in `MetadataKind`.
pub mod metadata_kind {
    /// Represents dynamic metadata associated with the request.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Request {}
    /// Represents metadata from :ref:`the route<envoy_v3_api_field_config.route.v3.Route.metadata>`.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Route {}
    /// Represents metadata from :ref:`the upstream cluster<envoy_v3_api_field_config.cluster.v3.Cluster.metadata>`.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Cluster {}
    /// Represents metadata from :ref:`the upstream  host<envoy_v3_api_field_config.endpoint.v3.LbEndpoint.metadata>`.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Host {}
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        /// Request kind of metadata.
        #[prost(message, tag = "1")]
        Request(Request),
        /// Route kind of metadata.
        #[prost(message, tag = "2")]
        Route(Route),
        /// Cluster kind of metadata.
        #[prost(message, tag = "3")]
        Cluster(Cluster),
        /// Host kind of metadata.
        #[prost(message, tag = "4")]
        Host(Host),
    }
}
