a2a-pb 0.3.2

A2A v1 protobuf-generated types and conversion layer
Documentation
// This file is @generated by prost-build.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpRule {
    #[prost(string, tag = "2")]
    pub get: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub put: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub post: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub delete: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub patch: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub body: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "11")]
    pub additional_bindings: ::prost::alloc::vec::Vec<HttpRule>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum FieldBehavior {
    Unspecified = 0,
    Optional = 1,
    Required = 2,
    OutputOnly = 3,
    InputOnly = 4,
    Immutable = 5,
}
impl FieldBehavior {
    /// 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 => "FIELD_BEHAVIOR_UNSPECIFIED",
            Self::Optional => "OPTIONAL",
            Self::Required => "REQUIRED",
            Self::OutputOnly => "OUTPUT_ONLY",
            Self::InputOnly => "INPUT_ONLY",
            Self::Immutable => "IMMUTABLE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "FIELD_BEHAVIOR_UNSPECIFIED" => Some(Self::Unspecified),
            "OPTIONAL" => Some(Self::Optional),
            "REQUIRED" => Some(Self::Required),
            "OUTPUT_ONLY" => Some(Self::OutputOnly),
            "INPUT_ONLY" => Some(Self::InputOnly),
            "IMMUTABLE" => Some(Self::Immutable),
            _ => None,
        }
    }
}