// @generated
// This file is @generated by prost-build.
/// CatalogParameter describes one input parameter surfaced in the generated
/// catalog for an operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CatalogParameter {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(bool, tag = "4")]
    pub required: bool,
    #[prost(message, optional, tag = "5")]
    pub default: ::core::option::Option<::prost_types::Value>,
}
/// OperationAnnotations carries optional host hints about how an operation
/// behaves.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OperationAnnotations {
    #[prost(bool, optional, tag = "1")]
    pub read_only_hint: ::core::option::Option<bool>,
    #[prost(bool, optional, tag = "2")]
    pub idempotent_hint: ::core::option::Option<bool>,
    #[prost(bool, optional, tag = "3")]
    pub destructive_hint: ::core::option::Option<bool>,
    #[prost(bool, optional, tag = "4")]
    pub open_world_hint: ::core::option::Option<bool>,
}
/// CatalogOperation is one executable operation exposed by an integration
/// provider.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CatalogOperation {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub method: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub input_schema: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub output_schema: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub annotations: ::core::option::Option<OperationAnnotations>,
    #[prost(message, repeated, tag = "8")]
    pub parameters: ::prost::alloc::vec::Vec<CatalogParameter>,
    #[prost(string, repeated, tag = "9")]
    pub required_scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag = "10")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag = "11")]
    pub read_only: bool,
    #[prost(bool, optional, tag = "12")]
    pub visible: ::core::option::Option<bool>,
    #[prost(string, tag = "13")]
    pub transport: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "14")]
    pub allowed_roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Catalog is the static or request-scoped executable surface exposed by a
/// provider.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Catalog {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub icon_svg: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "5")]
    pub operations: ::prost::alloc::vec::Vec<CatalogOperation>,
}
/// ConnectionParamDef describes one provider-defined connection parameter.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConnectionParamDef {
    #[prost(bool, tag = "1")]
    pub required: bool,
    #[prost(string, tag = "2")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub default_value: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub from: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub field: ::prost::alloc::string::String,
}
/// ProviderMetadata describes an integration provider's static capabilities.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProviderMetadata {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub display_name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(enumeration = "ConnectionMode", tag = "4")]
    pub connection_mode: i32,
    #[prost(string, repeated, tag = "5")]
    pub auth_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(btree_map = "string, message", tag = "6")]
    pub connection_params:
        ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ConnectionParamDef>,
    #[prost(message, optional, tag = "7")]
    pub static_catalog: ::core::option::Option<Catalog>,
    #[prost(bool, tag = "8")]
    pub supports_session_catalog: bool,
    #[prost(int32, tag = "11")]
    pub min_protocol_version: i32,
    #[prost(int32, tag = "12")]
    pub max_protocol_version: i32,
}
/// OperationResult is the serialized result returned from an Execute call.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OperationResult {
    #[prost(int32, tag = "1")]
    pub status: i32,
    #[prost(string, tag = "2")]
    pub body: ::prost::alloc::string::String,
    #[prost(btree_map = "string, message", tag = "3")]
    pub headers: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, StringList>,
}
/// AppInvokeRequest invokes a declared operation on another app through Gestalt.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppInvokeRequest {
    #[prost(string, tag = "2")]
    pub app: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub operation: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub params: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "5")]
    pub connection: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub instance: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub credential_mode: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "11")]
    pub context: ::core::option::Option<RequestContext>,
}
/// AppInvokeGraphQLRequest invokes the raw GraphQL surface on another plugin
/// through Gestalt.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppInvokeGraphQlRequest {
    #[prost(string, tag = "1")]
    pub app: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub document: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub variables: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "4")]
    pub connection: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub instance: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub context: ::core::option::Option<RequestContext>,
}
/// SubjectContext identifies the caller that initiated an operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectContext {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub credential_subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub email: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub display_name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "5")]
    pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, repeated, tag = "6")]
    pub permissions: ::prost::alloc::vec::Vec<SubjectPermissionContext>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubjectPermissionContext {
    #[prost(string, tag = "1")]
    pub app: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub operations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag = "3")]
    pub all_operations: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentToolRef {
    #[prost(string, tag = "1")]
    pub app: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub operation: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub connection: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub instance: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub credential_mode: ::prost::alloc::string::String,
    #[prost(string, tag = "8")]
    pub system: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "9")]
    pub run_as: ::core::option::Option<SubjectContext>,
}
/// StringList is a helper map value for repeated HTTP header and query values.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StringList {
    #[prost(string, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// CredentialContext describes the resolved credential used for an operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CredentialContext {
    #[prost(string, tag = "1")]
    pub mode: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub connection: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub instance: ::prost::alloc::string::String,
}
/// AccessContext describes the host-side access decision for an operation.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccessContext {
    #[prost(string, tag = "1")]
    pub policy: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub role: ::prost::alloc::string::String,
}
/// HostContext describes stable public host metadata available to provider code.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HostContext {
    #[prost(string, tag = "1")]
    pub public_base_url: ::prost::alloc::string::String,
}
/// ProviderContext identifies the provider process that received the request
/// context from the host and is trusted to propagate it back to host services.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProviderContext {
    #[prost(string, tag = "1")]
    pub kind: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct InvocationContext {
    #[prost(string, tag = "1")]
    pub request_id: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub depth: i32,
    #[prost(string, repeated, tag = "3")]
    pub call_chain: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "4")]
    pub surface: ::prost::alloc::string::String,
    #[prost(bool, tag = "5")]
    pub internal_connection_access: bool,
    #[prost(string, tag = "6")]
    pub connection: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RequestMetaContext {
    #[prost(string, tag = "1")]
    pub client_ip: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub remote_addr: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub user_agent: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentInvocationContext {
    #[prost(string, tag = "1")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub turn_id: ::prost::alloc::string::String,
}
/// RequestContext bundles the caller, credential, access, and host metadata for
/// one operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestContext {
    #[prost(message, optional, tag = "1")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "2")]
    pub credential: ::core::option::Option<CredentialContext>,
    #[prost(message, optional, tag = "3")]
    pub access: ::core::option::Option<AccessContext>,
    #[prost(message, optional, tag = "4")]
    pub workflow: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "5")]
    pub host: ::core::option::Option<HostContext>,
    /// Original agent caller when an agent tool executes with delegated run-as identity.
    #[prost(message, optional, tag = "6")]
    pub agent_subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "7")]
    pub caller: ::core::option::Option<ProviderContext>,
    #[prost(message, optional, tag = "8")]
    pub invocation: ::core::option::Option<InvocationContext>,
    /// Agent tool refs granted to the operation request, when the request is
    /// executing as an agent tool.
    #[prost(message, repeated, tag = "9")]
    pub tool_refs: ::prost::alloc::vec::Vec<AgentToolRef>,
    /// Preserves the distinction between an omitted tool-ref context and an
    /// explicitly empty inherited tool-ref context.
    #[prost(bool, tag = "10")]
    pub tool_refs_set: bool,
    #[prost(message, optional, tag = "11")]
    pub request_meta: ::core::option::Option<RequestMetaContext>,
    #[prost(message, optional, tag = "12")]
    pub agent: ::core::option::Option<AgentInvocationContext>,
}
/// HTTPSubjectRequest carries one verified hosted HTTP request into an optional
/// plugin-local subject resolution hook.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HttpSubjectRequest {
    #[prost(string, tag = "1")]
    pub binding: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub method: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub path: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub content_type: ::prost::alloc::string::String,
    #[prost(btree_map = "string, message", tag = "5")]
    pub headers: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, StringList>,
    #[prost(btree_map = "string, message", tag = "6")]
    pub query: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, StringList>,
    #[prost(message, optional, tag = "7")]
    pub params: ::core::option::Option<::prost_types::Struct>,
    #[prost(bytes = "vec", tag = "8")]
    pub raw_body: ::prost::alloc::vec::Vec<u8>,
    #[prost(string, tag = "9")]
    pub security_scheme: ::prost::alloc::string::String,
    #[prost(string, tag = "10")]
    pub verified_subject: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "11")]
    pub verified_claims: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// ResolveHTTPSubjectRequest asks a provider to map a verified hosted HTTP
/// request to a concrete Gestalt subject before normal operation authorization
/// and dispatch.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveHttpSubjectRequest {
    #[prost(message, optional, tag = "1")]
    pub request: ::core::option::Option<HttpSubjectRequest>,
    #[prost(message, optional, tag = "2")]
    pub context: ::core::option::Option<RequestContext>,
}
/// ResolveHTTPSubjectResponse returns the concrete Gestalt subject a hosted HTTP
/// request should execute as. An unset subject means "fall back to the binding
/// subject". When reject_status is set, the host should reject the inbound
/// request with the provided status and message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveHttpSubjectResponse {
    #[prost(message, optional, tag = "1")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(int32, tag = "2")]
    pub reject_status: i32,
    #[prost(string, tag = "3")]
    pub reject_message: ::prost::alloc::string::String,
}
/// ExecuteRequest invokes one executable operation.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecuteRequest {
    #[prost(string, tag = "1")]
    pub operation: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub params: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "3")]
    pub token: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "4")]
    pub connection_params: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "5")]
    pub invocation_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "9")]
    pub idempotency_key: ::prost::alloc::string::String,
}
/// GetSessionCatalogRequest asks a provider for request-scoped catalog
/// extensions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionCatalogRequest {
    #[prost(string, tag = "1")]
    pub token: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "2")]
    pub connection_params: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "3")]
    pub invocation_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub context: ::core::option::Option<RequestContext>,
}
/// GetSessionCatalogResponse returns request-scoped catalog extensions.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSessionCatalogResponse {
    #[prost(message, optional, tag = "1")]
    pub catalog: ::core::option::Option<Catalog>,
}
/// StartProviderRequest configures an integration provider for one runtime
/// session.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartProviderRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub config: ::core::option::Option<::prost_types::Struct>,
    #[prost(int32, tag = "4")]
    pub protocol_version: i32,
}
/// StartProviderResponse confirms the protocol version the provider is serving.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartProviderResponse {
    #[prost(int32, tag = "1")]
    pub protocol_version: i32,
}
/// ConnectionMode describes which credential sources a provider accepts.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ConnectionMode {
    Unspecified = 0,
    None = 1,
    Subject = 2,
}
impl ConnectionMode {
    /// 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 => "CONNECTION_MODE_UNSPECIFIED",
            Self::None => "CONNECTION_MODE_NONE",
            Self::Subject => "CONNECTION_MODE_SUBJECT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CONNECTION_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "CONNECTION_MODE_NONE" => Some(Self::None),
            "CONNECTION_MODE_SUBJECT" => Some(Self::Subject),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentMessage {
    #[prost(string, tag = "1")]
    pub role: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub text: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub parts: ::prost::alloc::vec::Vec<AgentMessagePart>,
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentMessagePartToolCall {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub tool_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub arguments: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentMessagePartToolResult {
    #[prost(string, tag = "1")]
    pub tool_call_id: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub status: i32,
    #[prost(string, tag = "3")]
    pub content: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub output: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentMessagePartImageRef {
    #[prost(string, tag = "1")]
    pub uri: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub mime_type: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentMessagePart {
    #[prost(enumeration = "AgentMessagePartType", tag = "1")]
    pub r#type: i32,
    #[prost(string, tag = "2")]
    pub text: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub json: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "4")]
    pub tool_call: ::core::option::Option<AgentMessagePartToolCall>,
    #[prost(message, optional, tag = "5")]
    pub tool_result: ::core::option::Option<AgentMessagePartToolResult>,
    #[prost(message, optional, tag = "6")]
    pub image_ref: ::core::option::Option<AgentMessagePartImageRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentWorkspace {
    #[prost(message, repeated, tag = "1")]
    pub checkouts: ::prost::alloc::vec::Vec<AgentWorkspaceGitCheckout>,
    #[prost(string, tag = "2")]
    pub cwd: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentWorkspaceGitCheckout {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub r#ref: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PreparedAgentWorkspace {
    #[prost(string, tag = "1")]
    pub root: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub cwd: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedAgentTool {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub description: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub parameters_schema: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "6")]
    pub r#ref: ::core::option::Option<AgentToolRef>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentProviderCapabilities {
    #[prost(bool, tag = "1")]
    pub streaming_text: bool,
    #[prost(bool, tag = "2")]
    pub tool_calls: bool,
    #[prost(bool, tag = "3")]
    pub parallel_tool_calls: bool,
    #[prost(bool, tag = "5")]
    pub interactions: bool,
    #[prost(bool, tag = "6")]
    pub resumable_turns: bool,
    #[prost(bool, tag = "7")]
    pub reasoning_summaries: bool,
    /// Provider list APIs can apply non-zero limits and summary projections without
    /// hydrating every source record. Providers that set this must order sessions
    /// and turns by the relevant newest-first recency fields before applying limit.
    #[prost(bool, tag = "9")]
    pub bounded_list_hydration: bool,
    #[prost(enumeration = "AgentToolSourceMode", repeated, tag = "10")]
    pub supported_tool_sources: ::prost::alloc::vec::Vec<i32>,
    #[prost(bool, tag = "11")]
    pub supports_session_start: bool,
    #[prost(bool, tag = "12")]
    pub supports_prepared_workspace: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAgentProviderCapabilitiesRequest {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentInteraction {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration = "AgentInteractionType", tag = "2")]
    pub r#type: i32,
    #[prost(enumeration = "AgentInteractionState", tag = "3")]
    pub state: i32,
    #[prost(string, tag = "4")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub prompt: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub request: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "7")]
    pub resolution: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "8")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "9")]
    pub resolved_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "10")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub session_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSession {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub model: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub client_ref: ::prost::alloc::string::String,
    #[prost(enumeration = "AgentSessionState", tag = "5")]
    pub state: i32,
    #[prost(message, optional, tag = "6")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "7")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "9")]
    pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "10")]
    pub last_turn_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAgentProviderSessionRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub model: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub client_ref: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "7")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "9")]
    pub session_start: ::core::option::Option<AgentSessionStartConfig>,
    #[prost(message, optional, tag = "10")]
    pub prepared_workspace: ::core::option::Option<PreparedAgentWorkspace>,
    #[prost(string, tag = "11")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "13")]
    pub workspace: ::core::option::Option<AgentWorkspace>,
    #[prost(message, optional, tag = "15")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(message, optional, tag = "16")]
    pub tools: ::core::option::Option<AgentToolConfig>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentToolConfig {
    #[prost(oneof = "agent_tool_config::Source", tags = "1, 2")]
    pub source: ::core::option::Option<agent_tool_config::Source>,
}
/// Nested message and enum types in `AgentToolConfig`.
pub mod agent_tool_config {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Source {
        #[prost(message, tag = "1")]
        None(super::AgentNoTools),
        #[prost(message, tag = "2")]
        Catalog(super::AgentCatalogToolConfig),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentNoTools {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentCatalogToolConfig {
    #[prost(message, repeated, tag = "1")]
    pub refs: ::prost::alloc::vec::Vec<AgentToolRef>,
    #[prost(message, repeated, tag = "2")]
    pub tools: ::prost::alloc::vec::Vec<ListedAgentTool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSessionStartConfig {
    #[prost(message, repeated, tag = "1")]
    pub hooks: ::prost::alloc::vec::Vec<AgentSessionStartHook>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentSessionStartHook {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "3")]
    pub command: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "4")]
    pub cwd: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub timeout: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "6")]
    pub env: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(message, optional, tag = "7")]
    pub output: ::core::option::Option<AgentSessionStartHookOutput>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentSessionStartHookOutput {
    #[prost(bool, tag = "1")]
    pub additional_context: bool,
    #[prost(bool, tag = "2")]
    pub metadata: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAgentProviderSessionRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "5")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "6")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderSessionsRequest {
    #[prost(message, optional, tag = "1")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(string, repeated, tag = "2")]
    pub session_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "AgentSessionState", tag = "3")]
    pub state: i32,
    /// When non-zero and bounded_list_hydration is supported, cap results after
    /// ordering sessions newest-first by last_turn_at, updated_at, then created_at.
    #[prost(int32, tag = "4")]
    pub limit: i32,
    /// When true and bounded_list_hydration is supported, omit heavy fields such as
    /// metadata unless exact session_ids require direct lookup.
    #[prost(bool, tag = "5")]
    pub summary_only: bool,
    #[prost(string, tag = "6")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "9")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderSessionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub sessions: ::prost::alloc::vec::Vec<AgentSession>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateAgentProviderSessionRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub client_ref: ::prost::alloc::string::String,
    #[prost(enumeration = "AgentSessionState", tag = "3")]
    pub state: i32,
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "5")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "8")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "9")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentTurn {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub model: ::prost::alloc::string::String,
    #[prost(enumeration = "AgentExecutionStatus", tag = "5")]
    pub status: i32,
    #[prost(message, repeated, tag = "6")]
    pub messages: ::prost::alloc::vec::Vec<AgentMessage>,
    #[prost(string, tag = "9")]
    pub status_message: ::prost::alloc::string::String,
    #[prost(string, tag = "10")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "11")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "12")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "13")]
    pub completed_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "14")]
    pub execution_ref: ::prost::alloc::string::String,
    #[prost(oneof = "agent_turn::Output", tags = "20, 21")]
    pub output: ::core::option::Option<agent_turn::Output>,
}
/// Nested message and enum types in `AgentTurn`.
pub mod agent_turn {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Output {
        #[prost(message, tag = "20")]
        Text(super::AgentTurnTextOutput),
        #[prost(message, tag = "21")]
        Structured(super::AgentTurnStructuredOutput),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentTurnTextOutput {
    #[prost(string, tag = "1")]
    pub text: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentTurnStructuredOutput {
    #[prost(string, tag = "1")]
    pub text: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub value: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentTurnDisplay {
    #[prost(string, tag = "1")]
    pub kind: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub phase: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub text: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub label: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub r#ref: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub parent_ref: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub input: ::core::option::Option<::prost_types::Value>,
    #[prost(message, optional, tag = "8")]
    pub output: ::core::option::Option<::prost_types::Value>,
    #[prost(message, optional, tag = "9")]
    pub error: ::core::option::Option<::prost_types::Value>,
    #[prost(string, tag = "10")]
    pub action: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub format: ::prost::alloc::string::String,
    #[prost(string, tag = "12")]
    pub language: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateAgentProviderTurnRequest {
    #[prost(string, tag = "1")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub model: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "5")]
    pub messages: ::prost::alloc::vec::Vec<AgentMessage>,
    #[prost(message, repeated, tag = "6")]
    pub tools: ::prost::alloc::vec::Vec<ResolvedAgentTool>,
    #[prost(message, optional, tag = "8")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "10")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub execution_ref: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "14")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "16")]
    pub model_options: ::core::option::Option<::prost_types::Struct>,
    /// Optional provider-owned turn execution budget, in seconds.
    /// If unset or zero, the provider chooses its own execution timeout. This does
    /// not control the CreateTurn RPC deadline.
    #[prost(int32, tag = "18")]
    pub timeout_seconds: i32,
    #[prost(message, optional, tag = "21")]
    pub output: ::core::option::Option<AgentOutput>,
    #[prost(message, optional, tag = "23")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "24")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AgentTextOutput {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentStructuredOutput {
    #[prost(message, optional, tag = "1")]
    pub schema: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentOutput {
    #[prost(oneof = "agent_output::Kind", tags = "1, 2")]
    pub kind: ::core::option::Option<agent_output::Kind>,
}
/// Nested message and enum types in `AgentOutput`.
pub mod agent_output {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(message, tag = "1")]
        Text(super::AgentTextOutput),
        #[prost(message, tag = "2")]
        Structured(super::AgentStructuredOutput),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAgentProviderTurnRequest {
    #[prost(string, tag = "1")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "5")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "6")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderTurnsRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(string, repeated, tag = "3")]
    pub turn_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "AgentExecutionStatus", tag = "4")]
    pub status: i32,
    /// When non-zero and bounded_list_hydration is supported, cap results after
    /// ordering turns newest-first by created_at.
    #[prost(int32, tag = "5")]
    pub limit: i32,
    /// When true and bounded_list_hydration is supported, omit heavy fields such as
    /// messages, output text, and structured output unless exact turn_ids require
    /// direct lookup.
    #[prost(bool, tag = "6")]
    pub summary_only: bool,
    #[prost(message, optional, tag = "9")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "10")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderTurnsResponse {
    #[prost(message, repeated, tag = "1")]
    pub turns: ::prost::alloc::vec::Vec<AgentTurn>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelAgentProviderTurnRequest {
    #[prost(string, tag = "1")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub reason: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "7")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AgentTurnEvent {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub seq: i64,
    #[prost(string, tag = "4")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub source: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub visibility: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub data: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "8")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "9")]
    pub display: ::core::option::Option<AgentTurnDisplay>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderTurnEventsRequest {
    #[prost(string, tag = "1")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub after_seq: i64,
    #[prost(int32, tag = "3")]
    pub limit: i32,
    #[prost(message, optional, tag = "4")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "7")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "8")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderTurnEventsResponse {
    #[prost(message, repeated, tag = "1")]
    pub events: ::prost::alloc::vec::Vec<AgentTurnEvent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetAgentProviderInteractionRequest {
    #[prost(string, tag = "1")]
    pub interaction_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "4")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderInteractionsRequest {
    #[prost(string, tag = "1")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "5")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "6")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAgentProviderInteractionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub interactions: ::prost::alloc::vec::Vec<AgentInteraction>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveAgentProviderInteractionRequest {
    #[prost(string, tag = "1")]
    pub interaction_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub resolution: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "3")]
    pub subject: ::core::option::Option<SubjectContext>,
    #[prost(string, tag = "5")]
    pub turn_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub context: ::core::option::Option<RequestContext>,
    #[prost(string, tag = "8")]
    pub provider_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListedAgentTool {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub mcp_name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub input_schema: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub output_schema: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub annotations: ::core::option::Option<OperationAnnotations>,
    #[prost(message, optional, tag = "8")]
    pub r#ref: ::core::option::Option<AgentToolRef>,
    #[prost(string, repeated, tag = "9")]
    pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "10")]
    pub search_text: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentMessagePartType {
    Unspecified = 0,
    Text = 1,
    Json = 2,
    ToolCall = 3,
    ToolResult = 4,
    ImageRef = 5,
}
impl AgentMessagePartType {
    /// 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 => "AGENT_MESSAGE_PART_TYPE_UNSPECIFIED",
            Self::Text => "AGENT_MESSAGE_PART_TYPE_TEXT",
            Self::Json => "AGENT_MESSAGE_PART_TYPE_JSON",
            Self::ToolCall => "AGENT_MESSAGE_PART_TYPE_TOOL_CALL",
            Self::ToolResult => "AGENT_MESSAGE_PART_TYPE_TOOL_RESULT",
            Self::ImageRef => "AGENT_MESSAGE_PART_TYPE_IMAGE_REF",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_MESSAGE_PART_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_MESSAGE_PART_TYPE_TEXT" => Some(Self::Text),
            "AGENT_MESSAGE_PART_TYPE_JSON" => Some(Self::Json),
            "AGENT_MESSAGE_PART_TYPE_TOOL_CALL" => Some(Self::ToolCall),
            "AGENT_MESSAGE_PART_TYPE_TOOL_RESULT" => Some(Self::ToolResult),
            "AGENT_MESSAGE_PART_TYPE_IMAGE_REF" => Some(Self::ImageRef),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentToolSourceMode {
    Unspecified = 0,
    Catalog = 2,
    None = 3,
}
impl AgentToolSourceMode {
    /// 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 => "AGENT_TOOL_SOURCE_MODE_UNSPECIFIED",
            Self::Catalog => "AGENT_TOOL_SOURCE_MODE_CATALOG",
            Self::None => "AGENT_TOOL_SOURCE_MODE_NONE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_TOOL_SOURCE_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_TOOL_SOURCE_MODE_CATALOG" => Some(Self::Catalog),
            "AGENT_TOOL_SOURCE_MODE_NONE" => Some(Self::None),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentExecutionStatus {
    Unspecified = 0,
    Pending = 1,
    Running = 2,
    Succeeded = 3,
    Failed = 4,
    Canceled = 5,
    WaitingForInput = 6,
}
impl AgentExecutionStatus {
    /// 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 => "AGENT_EXECUTION_STATUS_UNSPECIFIED",
            Self::Pending => "AGENT_EXECUTION_STATUS_PENDING",
            Self::Running => "AGENT_EXECUTION_STATUS_RUNNING",
            Self::Succeeded => "AGENT_EXECUTION_STATUS_SUCCEEDED",
            Self::Failed => "AGENT_EXECUTION_STATUS_FAILED",
            Self::Canceled => "AGENT_EXECUTION_STATUS_CANCELED",
            Self::WaitingForInput => "AGENT_EXECUTION_STATUS_WAITING_FOR_INPUT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_EXECUTION_STATUS_PENDING" => Some(Self::Pending),
            "AGENT_EXECUTION_STATUS_RUNNING" => Some(Self::Running),
            "AGENT_EXECUTION_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "AGENT_EXECUTION_STATUS_FAILED" => Some(Self::Failed),
            "AGENT_EXECUTION_STATUS_CANCELED" => Some(Self::Canceled),
            "AGENT_EXECUTION_STATUS_WAITING_FOR_INPUT" => Some(Self::WaitingForInput),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentSessionState {
    Unspecified = 0,
    Active = 1,
    Archived = 2,
}
impl AgentSessionState {
    /// 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 => "AGENT_SESSION_STATE_UNSPECIFIED",
            Self::Active => "AGENT_SESSION_STATE_ACTIVE",
            Self::Archived => "AGENT_SESSION_STATE_ARCHIVED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_SESSION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_SESSION_STATE_ACTIVE" => Some(Self::Active),
            "AGENT_SESSION_STATE_ARCHIVED" => Some(Self::Archived),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentInteractionType {
    Unspecified = 0,
    Approval = 1,
    Clarification = 2,
    Input = 3,
}
impl AgentInteractionType {
    /// 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 => "AGENT_INTERACTION_TYPE_UNSPECIFIED",
            Self::Approval => "AGENT_INTERACTION_TYPE_APPROVAL",
            Self::Clarification => "AGENT_INTERACTION_TYPE_CLARIFICATION",
            Self::Input => "AGENT_INTERACTION_TYPE_INPUT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_INTERACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_INTERACTION_TYPE_APPROVAL" => Some(Self::Approval),
            "AGENT_INTERACTION_TYPE_CLARIFICATION" => Some(Self::Clarification),
            "AGENT_INTERACTION_TYPE_INPUT" => Some(Self::Input),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AgentInteractionState {
    Unspecified = 0,
    Pending = 1,
    Resolved = 2,
    Canceled = 3,
}
impl AgentInteractionState {
    /// 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 => "AGENT_INTERACTION_STATE_UNSPECIFIED",
            Self::Pending => "AGENT_INTERACTION_STATE_PENDING",
            Self::Resolved => "AGENT_INTERACTION_STATE_RESOLVED",
            Self::Canceled => "AGENT_INTERACTION_STATE_CANCELED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AGENT_INTERACTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "AGENT_INTERACTION_STATE_PENDING" => Some(Self::Pending),
            "AGENT_INTERACTION_STATE_RESOLVED" => Some(Self::Resolved),
            "AGENT_INTERACTION_STATE_CANCELED" => Some(Self::Canceled),
            _ => None,
        }
    }
}
/// AuthenticatedUser is the normalized user identity returned by an authentication
/// provider after a login or token-validation flow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthenticatedUser {
    #[prost(string, tag = "1")]
    pub subject: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub email: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub email_verified: bool,
    #[prost(string, tag = "4")]
    pub display_name: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub avatar_url: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "6")]
    pub claims: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// BeginLoginRequest starts an interactive login flow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BeginLoginRequest {
    /// callback_url is the host-managed URL the provider should redirect back to.
    #[prost(string, tag = "1")]
    pub callback_url: ::prost::alloc::string::String,
    /// host_state is opaque state generated by the host and echoed back on
    /// completion.
    #[prost(string, tag = "2")]
    pub host_state: ::prost::alloc::string::String,
    /// scopes are the provider-specific scopes the host is requesting.
    #[prost(string, repeated, tag = "3")]
    pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// options carries provider-specific login parameters.
    #[prost(btree_map = "string, string", tag = "4")]
    pub options: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// BeginLoginResponse returns the provider-managed authorization URL and opaque
/// provider state that must be preserved until completion.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginLoginResponse {
    #[prost(string, tag = "1")]
    pub authorization_url: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub provider_state: ::prost::alloc::vec::Vec<u8>,
}
/// CompleteLoginRequest finishes an interactive login flow.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompleteLoginRequest {
    /// query contains the callback URL query parameters returned by the identity
    /// provider.
    #[prost(btree_map = "string, string", tag = "1")]
    pub query: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    /// provider_state is the opaque state returned from BeginLoginResponse.
    #[prost(bytes = "vec", tag = "2")]
    pub provider_state: ::prost::alloc::vec::Vec<u8>,
    /// callback_url is the fully qualified callback URL used by the host.
    #[prost(string, tag = "3")]
    pub callback_url: ::prost::alloc::string::String,
}
/// ValidateExternalTokenRequest asks the provider to validate a token minted
/// outside the interactive login flow.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ValidateExternalTokenRequest {
    #[prost(string, tag = "1")]
    pub token: ::prost::alloc::string::String,
}
/// AuthSessionSettings configures how the host persists authenticated sessions.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AuthSessionSettings {
    #[prost(int64, tag = "1")]
    pub session_ttl_seconds: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Subject {
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub properties: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub properties: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub properties: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAccessRequest {
    #[prost(message, optional, tag = "1")]
    pub subject: ::core::option::Option<Subject>,
    #[prost(message, optional, tag = "2")]
    pub action: ::core::option::Option<Action>,
    #[prost(message, optional, tag = "3")]
    pub resource: ::core::option::Option<Resource>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CheckAccessResponse {
    #[prost(bool, tag = "1")]
    pub allowed: bool,
    #[prost(string, tag = "2")]
    pub model_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAccessManyRequest {
    #[prost(message, repeated, tag = "1")]
    pub requests: ::prost::alloc::vec::Vec<CheckAccessRequest>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckAccessManyResponse {
    #[prost(message, repeated, tag = "1")]
    pub decisions: ::prost::alloc::vec::Vec<CheckAccessResponse>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelationshipsRequest {
    #[prost(message, optional, tag = "1")]
    pub filter: ::core::option::Option<RelationshipFilter>,
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationshipFilter {
    #[prost(message, optional, tag = "1")]
    pub target: ::core::option::Option<RelationshipTarget>,
    #[prost(string, tag = "2")]
    pub relation: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub resource: ::core::option::Option<Resource>,
    #[prost(enumeration = "RelationshipTargetType", tag = "4")]
    pub target_type: i32,
    #[prost(string, tag = "5")]
    pub target_entity_type: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub resource_type: ::prost::alloc::string::String,
    #[prost(enumeration = "SourceLayer", tag = "7")]
    pub source_layer: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRelationshipsResponse {
    #[prost(message, repeated, tag = "1")]
    pub relationships: ::prost::alloc::vec::Vec<Relationship>,
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRelationshipRequest {
    #[prost(message, optional, tag = "1")]
    pub relationship: ::core::option::Option<Relationship>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddRelationshipResponse {
    #[prost(message, optional, tag = "1")]
    pub relationship: ::core::option::Option<Relationship>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteRelationshipRequest {
    #[prost(message, optional, tag = "1")]
    pub relationship_tuple: ::core::option::Option<RelationshipTuple>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteRelationshipResponse {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetAuthorizationStateRequest {
    #[prost(message, optional, tag = "1")]
    pub model: ::core::option::Option<AuthorizationModel>,
    #[prost(message, repeated, tag = "2")]
    pub relationships: ::prost::alloc::vec::Vec<Relationship>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetAuthorizationStateResponse {
    #[prost(message, optional, tag = "1")]
    pub active_model: ::core::option::Option<AuthorizationModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Relationship {
    #[prost(message, optional, tag = "1")]
    pub tuple: ::core::option::Option<RelationshipTuple>,
    #[prost(message, optional, tag = "2")]
    pub properties: ::core::option::Option<::prost_types::Struct>,
    #[prost(enumeration = "SourceLayer", tag = "3")]
    pub source_layer: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationshipTuple {
    #[prost(message, optional, tag = "1")]
    pub target: ::core::option::Option<RelationshipTarget>,
    #[prost(string, tag = "2")]
    pub relation: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub resource: ::core::option::Option<Resource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelationshipTarget {
    #[prost(oneof = "relationship_target::Kind", tags = "1, 2, 3")]
    pub kind: ::core::option::Option<relationship_target::Kind>,
}
/// Nested message and enum types in `RelationshipTarget`.
pub mod relationship_target {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(message, tag = "1")]
        Subject(super::Subject),
        #[prost(message, tag = "2")]
        Resource(super::Resource),
        #[prost(message, tag = "3")]
        SubjectSet(super::SubjectSet),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SubjectSet {
    #[prost(message, optional, tag = "1")]
    pub resource: ::core::option::Option<Resource>,
    #[prost(string, tag = "2")]
    pub relation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationModel {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub resource_types: ::prost::alloc::vec::Vec<AuthorizationModelResourceType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AuthorizationModelResourceType {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub relations: ::prost::alloc::vec::Vec<ModelRelation>,
    #[prost(message, repeated, tag = "3")]
    pub actions: ::prost::alloc::vec::Vec<ModelAction>,
    #[prost(enumeration = "SourceLayer", tag = "4")]
    pub source_layer: i32,
    #[prost(enumeration = "DefaultAccessPolicy", tag = "5")]
    pub default_access_policy: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ModelRelation {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub allowed_targets: ::prost::alloc::vec::Vec<ModelAllowedTarget>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelAction {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub relations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ModelAllowedTarget {
    #[prost(oneof = "model_allowed_target::Kind", tags = "1, 2, 3")]
    pub kind: ::core::option::Option<model_allowed_target::Kind>,
}
/// Nested message and enum types in `ModelAllowedTarget`.
pub mod model_allowed_target {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Kind {
        #[prost(string, tag = "1")]
        SubjectType(::prost::alloc::string::String),
        #[prost(string, tag = "2")]
        ResourceType(::prost::alloc::string::String),
        #[prost(message, tag = "3")]
        SubjectSetType(super::SubjectSetType),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubjectSetType {
    #[prost(string, tag = "1")]
    pub resource_type: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub relation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AuthorizationModelRef {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub version: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetActiveModelRefResponse {
    #[prost(message, optional, tag = "1")]
    pub model: ::core::option::Option<AuthorizationModelRef>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetActiveModelRequest {
    #[prost(message, optional, tag = "1")]
    pub model: ::core::option::Option<AuthorizationModel>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetActiveModelResponse {
    #[prost(message, optional, tag = "1")]
    pub model: ::core::option::Option<AuthorizationModelRef>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListActiveModelResourceTypesRequest {
    #[prost(message, optional, tag = "1")]
    pub filter: ::core::option::Option<AuthorizationModelResourceTypeFilter>,
    #[prost(int32, tag = "2")]
    pub page_size: i32,
    #[prost(string, tag = "3")]
    pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AuthorizationModelResourceTypeFilter {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration = "SourceLayer", tag = "2")]
    pub source_layer: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListActiveModelResourceTypesResponse {
    #[prost(message, repeated, tag = "1")]
    pub resource_types: ::prost::alloc::vec::Vec<AuthorizationModelResourceType>,
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub model_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RelationshipTargetType {
    Unspecified = 0,
    Subject = 1,
    Resource = 2,
    SubjectSet = 3,
}
impl RelationshipTargetType {
    /// 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 => "RELATIONSHIP_TARGET_TYPE_UNSPECIFIED",
            Self::Subject => "RELATIONSHIP_TARGET_TYPE_SUBJECT",
            Self::Resource => "RELATIONSHIP_TARGET_TYPE_RESOURCE",
            Self::SubjectSet => "RELATIONSHIP_TARGET_TYPE_SUBJECT_SET",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RELATIONSHIP_TARGET_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "RELATIONSHIP_TARGET_TYPE_SUBJECT" => Some(Self::Subject),
            "RELATIONSHIP_TARGET_TYPE_RESOURCE" => Some(Self::Resource),
            "RELATIONSHIP_TARGET_TYPE_SUBJECT_SET" => Some(Self::SubjectSet),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DefaultAccessPolicy {
    Deny = 0,
    Allow = 1,
}
impl DefaultAccessPolicy {
    /// 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::Deny => "DEFAULT_ACCESS_POLICY_DENY",
            Self::Allow => "DEFAULT_ACCESS_POLICY_ALLOW",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "DEFAULT_ACCESS_POLICY_DENY" => Some(Self::Deny),
            "DEFAULT_ACCESS_POLICY_ALLOW" => Some(Self::Allow),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SourceLayer {
    Unspecified = 0,
    StaticConfig = 1,
    Runtime = 2,
}
impl SourceLayer {
    /// 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 => "SOURCE_LAYER_UNSPECIFIED",
            Self::StaticConfig => "SOURCE_LAYER_STATIC_CONFIG",
            Self::Runtime => "SOURCE_LAYER_RUNTIME",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SOURCE_LAYER_UNSPECIFIED" => Some(Self::Unspecified),
            "SOURCE_LAYER_STATIC_CONFIG" => Some(Self::StaticConfig),
            "SOURCE_LAYER_RUNTIME" => Some(Self::Runtime),
            _ => None,
        }
    }
}
/// CacheSetEntry is one key/value pair written by SetMany.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheSetEntry {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
/// CacheResult is one lookup result returned by GetMany.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheResult {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub found: bool,
    #[prost(bytes = "vec", tag = "3")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
/// CacheGetRequest loads one cache key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheGetRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// CacheGetResponse is the result of looking up one cache key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheGetResponse {
    #[prost(bool, tag = "1")]
    pub found: bool,
    #[prost(bytes = "vec", tag = "2")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
/// CacheGetManyRequest loads multiple cache keys in one RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheGetManyRequest {
    #[prost(string, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// CacheGetManyResponse returns every lookup result for GetMany.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheGetManyResponse {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<CacheResult>,
}
/// CacheSetRequest writes one cache key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheSetRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bytes = "vec", tag = "2")]
    pub value: ::prost::alloc::vec::Vec<u8>,
    /// ttl applies an optional expiration to the entry.
    #[prost(message, optional, tag = "3")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
}
/// CacheSetManyRequest writes multiple cache keys in one RPC.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CacheSetManyRequest {
    #[prost(message, repeated, tag = "1")]
    pub entries: ::prost::alloc::vec::Vec<CacheSetEntry>,
    #[prost(message, optional, tag = "2")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
}
/// CacheDeleteRequest removes one cache key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheDeleteRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// CacheDeleteResponse reports whether one key existed and was deleted.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheDeleteResponse {
    #[prost(bool, tag = "1")]
    pub deleted: bool,
}
/// CacheDeleteManyRequest removes multiple cache keys in one RPC.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheDeleteManyRequest {
    #[prost(string, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// CacheDeleteManyResponse reports how many keys were deleted.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheDeleteManyResponse {
    #[prost(int64, tag = "1")]
    pub deleted: i64,
}
/// CacheTouchRequest extends the TTL for one cache key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheTouchRequest {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub ttl: ::core::option::Option<::prost_types::Duration>,
}
/// CacheTouchResponse reports whether a key existed and had its TTL updated.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CacheTouchResponse {
    #[prost(bool, tag = "1")]
    pub touched: bool,
}
/// TypedValue stores one scalar or structured value in an IndexedDB record.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TypedValue {
    #[prost(oneof = "typed_value::Kind", tags = "1, 2, 3, 4, 5, 6, 7, 8")]
    pub kind: ::core::option::Option<typed_value::Kind>,
}
/// Nested message and enum types in `TypedValue`.
pub mod typed_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(enumeration = "::prost_types::NullValue", tag = "1")]
        NullValue(i32),
        #[prost(string, tag = "2")]
        StringValue(::prost::alloc::string::String),
        #[prost(int64, tag = "3")]
        IntValue(i64),
        #[prost(double, tag = "4")]
        FloatValue(f64),
        #[prost(bool, tag = "5")]
        BoolValue(bool),
        #[prost(message, tag = "6")]
        TimeValue(::prost_types::Timestamp),
        #[prost(bytes, tag = "7")]
        BytesValue(::prost::alloc::vec::Vec<u8>),
        #[prost(message, tag = "8")]
        JsonValue(::prost_types::Value),
    }
}
/// Record is one JSON-like row in an object store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Record {
    #[prost(btree_map = "string, message", tag = "1")]
    pub fields: ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, TypedValue>,
}
/// ObjectStoreSchema describes the indexes and columns attached to an object
/// store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStoreSchema {
    #[prost(message, repeated, tag = "1")]
    pub indexes: ::prost::alloc::vec::Vec<IndexSchema>,
    #[prost(message, repeated, tag = "2")]
    pub columns: ::prost::alloc::vec::Vec<ColumnDef>,
}
/// IndexSchema describes one secondary index on an object store.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct IndexSchema {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "2")]
    pub key_path: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag = "3")]
    pub unique: bool,
}
/// ColumnDef is reserved for providers that preserve SQL-style column metadata.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ColumnDef {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(int32, tag = "2")]
    pub r#type: i32,
    #[prost(bool, tag = "3")]
    pub primary_key: bool,
    #[prost(bool, tag = "4")]
    pub not_null: bool,
    #[prost(bool, tag = "5")]
    pub unique: bool,
}
/// KeyRange constrains a query or cursor by lower and upper bounds.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyRange {
    #[prost(message, optional, tag = "1")]
    pub lower: ::core::option::Option<TypedValue>,
    #[prost(message, optional, tag = "2")]
    pub upper: ::core::option::Option<TypedValue>,
    #[prost(bool, tag = "3")]
    pub lower_open: bool,
    #[prost(bool, tag = "4")]
    pub upper_open: bool,
}
/// RecordRequest addresses one object store and carries one row payload.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecordRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub record: ::core::option::Option<Record>,
}
/// RecordResponse wraps one row payload.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecordResponse {
    #[prost(message, optional, tag = "1")]
    pub record: ::core::option::Option<Record>,
}
/// RecordsResponse wraps repeated row payloads.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RecordsResponse {
    #[prost(message, repeated, tag = "1")]
    pub records: ::prost::alloc::vec::Vec<Record>,
}
/// KeysResponse wraps repeated primary keys.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeysResponse {
    #[prost(string, repeated, tag = "1")]
    pub keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// ObjectStoreRequest addresses one object store row by primary key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ObjectStoreRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
}
/// ObjectStoreNameRequest addresses an object store without a specific row key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ObjectStoreNameRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
}
/// ObjectStoreRangeRequest addresses an object store plus an optional key range.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectStoreRangeRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub range: ::core::option::Option<KeyRange>,
}
/// CreateObjectStoreRequest creates a new object store.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateObjectStoreRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub schema: ::core::option::Option<ObjectStoreSchema>,
}
/// DeleteObjectStoreRequest removes an object store.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteObjectStoreRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// IndexQueryRequest addresses a secondary index plus optional key values and
/// range constraints.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IndexQueryRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub index: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "3")]
    pub values: ::prost::alloc::vec::Vec<TypedValue>,
    #[prost(message, optional, tag = "4")]
    pub range: ::core::option::Option<KeyRange>,
}
/// CountResponse reports how many rows matched a query.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CountResponse {
    #[prost(int64, tag = "1")]
    pub count: i64,
}
/// OpenCursorRequest starts a streaming cursor over an object store or index.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OpenCursorRequest {
    #[prost(string, tag = "1")]
    pub store: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub range: ::core::option::Option<KeyRange>,
    #[prost(enumeration = "CursorDirection", tag = "3")]
    pub direction: i32,
    /// keys_only suppresses row payloads and returns only keys.
    #[prost(bool, tag = "4")]
    pub keys_only: bool,
    /// index selects a secondary index when non-empty.
    #[prost(string, tag = "5")]
    pub index: ::prost::alloc::string::String,
    /// values selects a compound index key prefix when index is set.
    #[prost(message, repeated, tag = "6")]
    pub values: ::prost::alloc::vec::Vec<TypedValue>,
}
/// KeyValue represents a single IndexedDB key, which can be a scalar
/// (string, number, date, binary) or a nested array of keys per the W3C spec.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValue {
    #[prost(oneof = "key_value::Kind", tags = "1, 2")]
    pub kind: ::core::option::Option<key_value::Kind>,
}
/// Nested message and enum types in `KeyValue`.
pub mod key_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(message, tag = "1")]
        Scalar(super::TypedValue),
        #[prost(message, tag = "2")]
        Array(super::KeyValueArray),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct KeyValueArray {
    #[prost(message, repeated, tag = "1")]
    pub elements: ::prost::alloc::vec::Vec<KeyValue>,
}
/// CursorKeyTarget addresses a specific cursor position.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CursorKeyTarget {
    #[prost(message, repeated, tag = "1")]
    pub key: ::prost::alloc::vec::Vec<KeyValue>,
}
/// CursorCommand advances, mutates, or closes an open cursor.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CursorCommand {
    #[prost(oneof = "cursor_command::Command", tags = "1, 2, 3, 4, 5, 6")]
    pub command: ::core::option::Option<cursor_command::Command>,
}
/// Nested message and enum types in `CursorCommand`.
pub mod cursor_command {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Command {
        #[prost(bool, tag = "1")]
        Next(bool),
        #[prost(message, tag = "2")]
        ContinueToKey(super::CursorKeyTarget),
        #[prost(int32, tag = "3")]
        Advance(i32),
        #[prost(message, tag = "4")]
        Update(super::Record),
        #[prost(bool, tag = "5")]
        Delete(bool),
        #[prost(bool, tag = "6")]
        Close(bool),
    }
}
/// CursorClientMessage is one frame in the bidirectional cursor stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CursorClientMessage {
    #[prost(oneof = "cursor_client_message::Msg", tags = "1, 2")]
    pub msg: ::core::option::Option<cursor_client_message::Msg>,
}
/// Nested message and enum types in `CursorClientMessage`.
pub mod cursor_client_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Msg {
        #[prost(message, tag = "1")]
        Open(super::OpenCursorRequest),
        #[prost(message, tag = "2")]
        Command(super::CursorCommand),
    }
}
/// CursorEntry is one streamed cursor row.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CursorEntry {
    /// Key components per index KeyPath field. Each component is a KeyValue
    /// that can be a scalar or a nested array, preserving the full W3C IndexedDB
    /// key structure including array-valued keys.
    #[prost(message, repeated, tag = "1")]
    pub key: ::prost::alloc::vec::Vec<KeyValue>,
    #[prost(string, tag = "2")]
    pub primary_key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub record: ::core::option::Option<Record>,
}
/// CursorResponse is one streamed cursor frame.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CursorResponse {
    #[prost(oneof = "cursor_response::Result", tags = "1, 2")]
    pub result: ::core::option::Option<cursor_response::Result>,
}
/// Nested message and enum types in `CursorResponse`.
pub mod cursor_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Result {
        #[prost(message, tag = "1")]
        Entry(super::CursorEntry),
        #[prost(bool, tag = "2")]
        Done(bool),
    }
}
/// DeleteResponse reports how many rows were deleted.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteResponse {
    #[prost(int64, tag = "1")]
    pub deleted: i64,
}
/// KeyResponse wraps one primary key.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct KeyResponse {
    #[prost(string, tag = "1")]
    pub key: ::prost::alloc::string::String,
}
/// BeginTransactionRequest starts an IndexedDB transaction stream.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginTransactionRequest {
    #[prost(string, repeated, tag = "1")]
    pub stores: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration = "TransactionMode", tag = "2")]
    pub mode: i32,
    #[prost(enumeration = "TransactionDurabilityHint", tag = "3")]
    pub durability_hint: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionBeginResponse {}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionCommitRequest {}
/// TransactionCommitResponse carries a non-OK status when commit failed after
/// the provider accepted the commit frame and rolled the transaction back.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionCommitResponse {
    #[prost(message, optional, tag = "1")]
    pub error: ::core::option::Option<super::super::super::google::rpc::Status>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TransactionAbortRequest {
    #[prost(string, tag = "1")]
    pub reason: ::prost::alloc::string::String,
}
/// TransactionAbortResponse acknowledges abort or reports an abort failure.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionAbortResponse {
    #[prost(message, optional, tag = "1")]
    pub error: ::core::option::Option<super::super::super::google::rpc::Status>,
}
/// TransactionOperation is one ordered transaction-scoped object store or index
/// operation. Cursor operations are intentionally excluded from the initial
/// transaction contract.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionOperation {
    #[prost(uint64, tag = "1")]
    pub request_id: u64,
    #[prost(
        oneof = "transaction_operation::Operation",
        tags = "10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25"
    )]
    pub operation: ::core::option::Option<transaction_operation::Operation>,
}
/// Nested message and enum types in `TransactionOperation`.
pub mod transaction_operation {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Operation {
        #[prost(message, tag = "10")]
        Get(super::ObjectStoreRequest),
        #[prost(message, tag = "11")]
        GetKey(super::ObjectStoreRequest),
        #[prost(message, tag = "12")]
        Add(super::RecordRequest),
        #[prost(message, tag = "13")]
        Put(super::RecordRequest),
        #[prost(message, tag = "14")]
        Delete(super::ObjectStoreRequest),
        #[prost(message, tag = "15")]
        Clear(super::ObjectStoreNameRequest),
        #[prost(message, tag = "16")]
        GetAll(super::ObjectStoreRangeRequest),
        #[prost(message, tag = "17")]
        GetAllKeys(super::ObjectStoreRangeRequest),
        #[prost(message, tag = "18")]
        Count(super::ObjectStoreRangeRequest),
        #[prost(message, tag = "19")]
        DeleteRange(super::ObjectStoreRangeRequest),
        #[prost(message, tag = "20")]
        IndexGet(super::IndexQueryRequest),
        #[prost(message, tag = "21")]
        IndexGetKey(super::IndexQueryRequest),
        #[prost(message, tag = "22")]
        IndexGetAll(super::IndexQueryRequest),
        #[prost(message, tag = "23")]
        IndexGetAllKeys(super::IndexQueryRequest),
        #[prost(message, tag = "24")]
        IndexCount(super::IndexQueryRequest),
        #[prost(message, tag = "25")]
        IndexDelete(super::IndexQueryRequest),
    }
}
/// TransactionOperationResponse is the ordered response to one operation.
/// Non-OK error marks the transaction failed and causes rollback in phase 1.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionOperationResponse {
    #[prost(uint64, tag = "1")]
    pub request_id: u64,
    #[prost(message, optional, tag = "2")]
    pub error: ::core::option::Option<super::super::super::google::rpc::Status>,
    #[prost(
        oneof = "transaction_operation_response::Result",
        tags = "10, 11, 12, 13, 14, 15, 16"
    )]
    pub result: ::core::option::Option<transaction_operation_response::Result>,
}
/// Nested message and enum types in `TransactionOperationResponse`.
pub mod transaction_operation_response {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Result {
        #[prost(message, tag = "10")]
        Empty(()),
        #[prost(message, tag = "11")]
        Record(super::RecordResponse),
        #[prost(message, tag = "12")]
        Records(super::RecordsResponse),
        #[prost(message, tag = "13")]
        Key(super::KeyResponse),
        #[prost(message, tag = "14")]
        Keys(super::KeysResponse),
        #[prost(message, tag = "15")]
        Count(super::CountResponse),
        #[prost(message, tag = "16")]
        Delete(super::DeleteResponse),
    }
}
/// TransactionClientMessage is one client frame in the transaction stream. The
/// first frame must be BeginTransactionRequest.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionClientMessage {
    #[prost(oneof = "transaction_client_message::Msg", tags = "1, 2, 3, 4")]
    pub msg: ::core::option::Option<transaction_client_message::Msg>,
}
/// Nested message and enum types in `TransactionClientMessage`.
pub mod transaction_client_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Msg {
        #[prost(message, tag = "1")]
        Begin(super::BeginTransactionRequest),
        #[prost(message, tag = "2")]
        Operation(super::TransactionOperation),
        #[prost(message, tag = "3")]
        Commit(super::TransactionCommitRequest),
        #[prost(message, tag = "4")]
        Abort(super::TransactionAbortRequest),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TransactionServerMessage {
    #[prost(oneof = "transaction_server_message::Msg", tags = "1, 2, 3, 4")]
    pub msg: ::core::option::Option<transaction_server_message::Msg>,
}
/// Nested message and enum types in `TransactionServerMessage`.
pub mod transaction_server_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Msg {
        #[prost(message, tag = "1")]
        Begin(super::TransactionBeginResponse),
        #[prost(message, tag = "2")]
        Operation(super::TransactionOperationResponse),
        #[prost(message, tag = "3")]
        Commit(super::TransactionCommitResponse),
        #[prost(message, tag = "4")]
        Abort(super::TransactionAbortResponse),
    }
}
/// CursorDirection controls IndexedDB cursor traversal order.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum CursorDirection {
    CursorNext = 0,
    CursorNextUnique = 1,
    CursorPrev = 2,
    CursorPrevUnique = 3,
}
impl CursorDirection {
    /// 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::CursorNext => "CURSOR_NEXT",
            Self::CursorNextUnique => "CURSOR_NEXT_UNIQUE",
            Self::CursorPrev => "CURSOR_PREV",
            Self::CursorPrevUnique => "CURSOR_PREV_UNIQUE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "CURSOR_NEXT" => Some(Self::CursorNext),
            "CURSOR_NEXT_UNIQUE" => Some(Self::CursorNextUnique),
            "CURSOR_PREV" => Some(Self::CursorPrev),
            "CURSOR_PREV_UNIQUE" => Some(Self::CursorPrevUnique),
            _ => None,
        }
    }
}
/// TransactionMode controls whether a transaction may mutate scoped stores.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionMode {
    TransactionReadonly = 0,
    TransactionReadwrite = 1,
}
impl TransactionMode {
    /// 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::TransactionReadonly => "TRANSACTION_READONLY",
            Self::TransactionReadwrite => "TRANSACTION_READWRITE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANSACTION_READONLY" => Some(Self::TransactionReadonly),
            "TRANSACTION_READWRITE" => Some(Self::TransactionReadwrite),
            _ => None,
        }
    }
}
/// TransactionDurabilityHint mirrors the W3C IndexedDB durability option as a
/// provider hint. It is not a portable durability guarantee.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum TransactionDurabilityHint {
    TransactionDurabilityDefault = 0,
    TransactionDurabilityStrict = 1,
    TransactionDurabilityRelaxed = 2,
}
impl TransactionDurabilityHint {
    /// 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::TransactionDurabilityDefault => "TRANSACTION_DURABILITY_DEFAULT",
            Self::TransactionDurabilityStrict => "TRANSACTION_DURABILITY_STRICT",
            Self::TransactionDurabilityRelaxed => "TRANSACTION_DURABILITY_RELAXED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TRANSACTION_DURABILITY_DEFAULT" => Some(Self::TransactionDurabilityDefault),
            "TRANSACTION_DURABILITY_STRICT" => Some(Self::TransactionDurabilityStrict),
            "TRANSACTION_DURABILITY_RELAXED" => Some(Self::TransactionDurabilityRelaxed),
            _ => None,
        }
    }
}
/// ProviderIdentity describes a provider surface and the protocol versions it
/// supports.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProviderIdentity {
    #[prost(enumeration = "ProviderKind", tag = "1")]
    pub kind: i32,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub display_name: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub version: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "6")]
    pub warnings: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(int32, tag = "10")]
    pub min_protocol_version: i32,
    #[prost(int32, tag = "11")]
    pub max_protocol_version: i32,
}
/// ConfigureProviderRequest configures a non-integration provider for one
/// runtime session.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfigureProviderRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub config: ::core::option::Option<::prost_types::Struct>,
    #[prost(int32, tag = "3")]
    pub protocol_version: i32,
}
/// ConfigureProviderResponse confirms the protocol version the provider is
/// serving.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureProviderResponse {
    #[prost(int32, tag = "1")]
    pub protocol_version: i32,
}
/// HealthCheckResponse reports runtime readiness for a provider surface.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HealthCheckResponse {
    #[prost(bool, tag = "1")]
    pub ready: bool,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
}
/// StartRuntimeProviderResponse confirms the protocol version the provider is
/// serving after the optional runtime start phase.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StartRuntimeProviderResponse {
    #[prost(int32, tag = "1")]
    pub protocol_version: i32,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProviderKind {
    Unspecified = 0,
    App = 1,
    Authentication = 2,
    Indexeddb = 3,
    Secrets = 4,
    Telemetry = 5,
    Cache = 6,
    S3 = 7,
    Workflow = 8,
    Authorization = 9,
    Runtime = 10,
    Agent = 11,
    ExternalCredential = 12,
    Test = 13,
}
impl ProviderKind {
    /// 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 => "PROVIDER_KIND_UNSPECIFIED",
            Self::App => "PROVIDER_KIND_APP",
            Self::Authentication => "PROVIDER_KIND_AUTHENTICATION",
            Self::Indexeddb => "PROVIDER_KIND_INDEXEDDB",
            Self::Secrets => "PROVIDER_KIND_SECRETS",
            Self::Telemetry => "PROVIDER_KIND_TELEMETRY",
            Self::Cache => "PROVIDER_KIND_CACHE",
            Self::S3 => "PROVIDER_KIND_S3",
            Self::Workflow => "PROVIDER_KIND_WORKFLOW",
            Self::Authorization => "PROVIDER_KIND_AUTHORIZATION",
            Self::Runtime => "PROVIDER_KIND_RUNTIME",
            Self::Agent => "PROVIDER_KIND_AGENT",
            Self::ExternalCredential => "PROVIDER_KIND_EXTERNAL_CREDENTIAL",
            Self::Test => "PROVIDER_KIND_TEST",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PROVIDER_KIND_UNSPECIFIED" => Some(Self::Unspecified),
            "PROVIDER_KIND_APP" => Some(Self::App),
            "PROVIDER_KIND_AUTHENTICATION" => Some(Self::Authentication),
            "PROVIDER_KIND_INDEXEDDB" => Some(Self::Indexeddb),
            "PROVIDER_KIND_SECRETS" => Some(Self::Secrets),
            "PROVIDER_KIND_TELEMETRY" => Some(Self::Telemetry),
            "PROVIDER_KIND_CACHE" => Some(Self::Cache),
            "PROVIDER_KIND_S3" => Some(Self::S3),
            "PROVIDER_KIND_WORKFLOW" => Some(Self::Workflow),
            "PROVIDER_KIND_AUTHORIZATION" => Some(Self::Authorization),
            "PROVIDER_KIND_RUNTIME" => Some(Self::Runtime),
            "PROVIDER_KIND_AGENT" => Some(Self::Agent),
            "PROVIDER_KIND_EXTERNAL_CREDENTIAL" => Some(Self::ExternalCredential),
            "PROVIDER_KIND_TEST" => Some(Self::Test),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuntimeSupport {
    #[prost(bool, tag = "1")]
    pub can_host_apps: bool,
    #[prost(enumeration = "RuntimeEgressMode", tag = "3")]
    pub egress_mode: i32,
    #[prost(bool, tag = "7")]
    pub supports_prepare_workspace: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RuntimeSession {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub state: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "3")]
    pub metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(message, optional, tag = "4")]
    pub lifecycle: ::core::option::Option<RuntimeSessionLifecycle>,
    #[prost(string, tag = "5")]
    pub state_reason: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub state_message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuntimeSessionLifecycle {
    #[prost(message, optional, tag = "1")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "2")]
    pub recommended_drain_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "3")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuntimeImagePullAuth {
    #[prost(string, tag = "1")]
    pub docker_config_json: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartRuntimeSessionRequest {
    #[prost(string, tag = "1")]
    pub app_name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub template: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub image: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "4")]
    pub metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(message, optional, tag = "6")]
    pub image_pull_auth: ::core::option::Option<RuntimeImagePullAuth>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetRuntimeSessionRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListRuntimeSessionsRequest {
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListRuntimeSessionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub sessions: ::prost::alloc::vec::Vec<RuntimeSession>,
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopRuntimeSessionRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrepareRuntimeWorkspaceRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub agent_session_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub workspace: ::core::option::Option<AgentWorkspace>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PrepareRuntimeWorkspaceResponse {
    #[prost(message, optional, tag = "1")]
    pub workspace: ::core::option::Option<PreparedAgentWorkspace>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveRuntimeWorkspaceRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub agent_session_id: ::prost::alloc::string::String,
}
/// StartHostedAppRequest describes the app process to launch inside a
/// runtime session. The runtime backend owns allocation and injection of the
/// app's listener endpoint and returns a host-reachable dial target in the
/// HostedApp response.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartHostedAppRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub app_name: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub command: ::prost::alloc::string::String,
    #[prost(string, repeated, tag = "4")]
    pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(btree_map = "string, string", tag = "5")]
    pub env: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, repeated, tag = "7")]
    pub allowed_hosts: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "8")]
    pub default_action: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub host_binary: ::prost::alloc::string::String,
    #[prost(string, tag = "11")]
    pub workdir: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HostedApp {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub app_name: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub dial_target: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RuntimeLogEntry {
    #[prost(enumeration = "RuntimeLogStream", tag = "1")]
    pub stream: i32,
    #[prost(string, tag = "2")]
    pub message: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub observed_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(int64, tag = "4")]
    pub source_seq: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AppendRuntimeLogsRequest {
    #[prost(string, tag = "1")]
    pub session_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "2")]
    pub logs: ::prost::alloc::vec::Vec<RuntimeLogEntry>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AppendRuntimeLogsResponse {
    #[prost(int64, tag = "1")]
    pub last_seq: i64,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RuntimeEgressMode {
    Unspecified = 0,
    None = 1,
    Cidr = 2,
    Hostname = 3,
}
impl RuntimeEgressMode {
    /// 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 => "RUNTIME_EGRESS_MODE_UNSPECIFIED",
            Self::None => "RUNTIME_EGRESS_MODE_NONE",
            Self::Cidr => "RUNTIME_EGRESS_MODE_CIDR",
            Self::Hostname => "RUNTIME_EGRESS_MODE_HOSTNAME",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RUNTIME_EGRESS_MODE_UNSPECIFIED" => Some(Self::Unspecified),
            "RUNTIME_EGRESS_MODE_NONE" => Some(Self::None),
            "RUNTIME_EGRESS_MODE_CIDR" => Some(Self::Cidr),
            "RUNTIME_EGRESS_MODE_HOSTNAME" => Some(Self::Hostname),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum RuntimeLogStream {
    Unspecified = 0,
    Stdout = 1,
    Stderr = 2,
    Runtime = 3,
}
impl RuntimeLogStream {
    /// 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 => "RUNTIME_LOG_STREAM_UNSPECIFIED",
            Self::Stdout => "RUNTIME_LOG_STREAM_STDOUT",
            Self::Stderr => "RUNTIME_LOG_STREAM_STDERR",
            Self::Runtime => "RUNTIME_LOG_STREAM_RUNTIME",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RUNTIME_LOG_STREAM_UNSPECIFIED" => Some(Self::Unspecified),
            "RUNTIME_LOG_STREAM_STDOUT" => Some(Self::Stdout),
            "RUNTIME_LOG_STREAM_STDERR" => Some(Self::Stderr),
            "RUNTIME_LOG_STREAM_RUNTIME" => Some(Self::Runtime),
            _ => None,
        }
    }
}
/// S3ObjectRef identifies one object or object version.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct S3ObjectRef {
    #[prost(string, tag = "2")]
    pub key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub version_id: ::prost::alloc::string::String,
}
/// S3ObjectMeta describes one object returned by the provider.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct S3ObjectMeta {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
    #[prost(string, tag = "2")]
    pub etag: ::prost::alloc::string::String,
    #[prost(int64, tag = "3")]
    pub size: i64,
    #[prost(string, tag = "4")]
    pub content_type: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub last_modified: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(btree_map = "string, string", tag = "6")]
    pub metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "7")]
    pub storage_class: ::prost::alloc::string::String,
}
/// ByteRange requests a half-open slice of an object's bytes.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ByteRange {
    #[prost(int64, optional, tag = "1")]
    pub start: ::core::option::Option<i64>,
    #[prost(int64, optional, tag = "2")]
    pub end: ::core::option::Option<i64>,
}
/// HeadObjectRequest fetches metadata for one object.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HeadObjectRequest {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
}
/// HeadObjectResponse returns object metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HeadObjectResponse {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<S3ObjectMeta>,
}
/// ReadObjectRequest opens a streaming object read.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReadObjectRequest {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
    #[prost(message, optional, tag = "2")]
    pub range: ::core::option::Option<ByteRange>,
    #[prost(string, tag = "3")]
    pub if_match: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub if_none_match: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub if_modified_since: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "6")]
    pub if_unmodified_since: ::core::option::Option<::prost_types::Timestamp>,
}
/// ReadObjectChunk is one frame in a streaming object read.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReadObjectChunk {
    #[prost(oneof = "read_object_chunk::Result", tags = "1, 2")]
    pub result: ::core::option::Option<read_object_chunk::Result>,
}
/// Nested message and enum types in `ReadObjectChunk`.
pub mod read_object_chunk {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Result {
        #[prost(message, tag = "1")]
        Meta(super::S3ObjectMeta),
        #[prost(bytes, tag = "2")]
        Data(::prost::alloc::vec::Vec<u8>),
    }
}
/// WriteObjectOpen carries the metadata frame that must be sent first in a
/// write-object stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectOpen {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
    #[prost(string, tag = "2")]
    pub content_type: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub cache_control: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub content_disposition: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub content_encoding: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub content_language: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "7")]
    pub metadata: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
    #[prost(string, tag = "8")]
    pub if_match: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub if_none_match: ::prost::alloc::string::String,
}
/// WriteObjectRequest is one frame in a write-object stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectRequest {
    #[prost(oneof = "write_object_request::Msg", tags = "1, 2")]
    pub msg: ::core::option::Option<write_object_request::Msg>,
}
/// Nested message and enum types in `WriteObjectRequest`.
pub mod write_object_request {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Msg {
        #[prost(message, tag = "1")]
        Open(super::WriteObjectOpen),
        #[prost(bytes, tag = "2")]
        Data(::prost::alloc::vec::Vec<u8>),
    }
}
/// WriteObjectResponse returns metadata for the committed object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WriteObjectResponse {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<S3ObjectMeta>,
}
/// DeleteObjectRequest removes one object.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteObjectRequest {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
}
/// ListObjectsRequest lists objects in the provider's configured bucket.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListObjectsRequest {
    #[prost(string, tag = "2")]
    pub prefix: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub delimiter: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub continuation_token: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub start_after: ::prost::alloc::string::String,
    #[prost(int32, tag = "6")]
    pub max_keys: i32,
}
/// ListObjectsResponse is one page of list-objects results.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListObjectsResponse {
    #[prost(message, repeated, tag = "1")]
    pub objects: ::prost::alloc::vec::Vec<S3ObjectMeta>,
    #[prost(string, repeated, tag = "2")]
    pub common_prefixes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, tag = "3")]
    pub next_continuation_token: ::prost::alloc::string::String,
    #[prost(bool, tag = "4")]
    pub has_more: bool,
}
/// CopyObjectRequest copies one object to another location.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CopyObjectRequest {
    #[prost(message, optional, tag = "1")]
    pub source: ::core::option::Option<S3ObjectRef>,
    #[prost(message, optional, tag = "2")]
    pub destination: ::core::option::Option<S3ObjectRef>,
    #[prost(string, tag = "3")]
    pub if_match: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub if_none_match: ::prost::alloc::string::String,
}
/// CopyObjectResponse returns metadata for the copied object.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CopyObjectResponse {
    #[prost(message, optional, tag = "1")]
    pub meta: ::core::option::Option<S3ObjectMeta>,
}
/// PresignObjectRequest asks the provider to mint a presigned URL.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PresignObjectRequest {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
    #[prost(enumeration = "PresignMethod", tag = "2")]
    pub method: i32,
    #[prost(int64, tag = "3")]
    pub expires_seconds: i64,
    #[prost(string, tag = "4")]
    pub content_type: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub content_disposition: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "6")]
    pub headers: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// PresignObjectResponse returns a presigned URL plus any required headers.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PresignObjectResponse {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(enumeration = "PresignMethod", tag = "2")]
    pub method: i32,
    #[prost(message, optional, tag = "3")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(btree_map = "string, string", tag = "4")]
    pub headers: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// CreateObjectAccessURLRequest asks the host to mint an HTTP object-access URL
/// for a plugin-scoped S3 binding. The host authorizes and scopes the URL, then
/// streams object bytes through the backing S3 provider.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateObjectAccessUrlRequest {
    #[prost(message, optional, tag = "1")]
    pub r#ref: ::core::option::Option<S3ObjectRef>,
    #[prost(enumeration = "PresignMethod", tag = "2")]
    pub method: i32,
    #[prost(int64, tag = "3")]
    pub expires_seconds: i64,
    #[prost(string, tag = "4")]
    pub content_type: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub content_disposition: ::prost::alloc::string::String,
    #[prost(btree_map = "string, string", tag = "6")]
    pub headers: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// CreateObjectAccessURLResponse returns a hosted object-access URL plus any
/// headers the caller must include when using it.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateObjectAccessUrlResponse {
    #[prost(string, tag = "1")]
    pub url: ::prost::alloc::string::String,
    #[prost(enumeration = "PresignMethod", tag = "2")]
    pub method: i32,
    #[prost(message, optional, tag = "3")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(btree_map = "string, string", tag = "4")]
    pub headers: ::prost::alloc::collections::BTreeMap<
        ::prost::alloc::string::String,
        ::prost::alloc::string::String,
    >,
}
/// PresignMethod identifies the HTTP verb encoded into a presigned URL.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PresignMethod {
    Unspecified = 0,
    Get = 1,
    Put = 2,
    Delete = 3,
    Head = 4,
}
impl PresignMethod {
    /// 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 => "PRESIGN_METHOD_UNSPECIFIED",
            Self::Get => "PRESIGN_METHOD_GET",
            Self::Put => "PRESIGN_METHOD_PUT",
            Self::Delete => "PRESIGN_METHOD_DELETE",
            Self::Head => "PRESIGN_METHOD_HEAD",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PRESIGN_METHOD_UNSPECIFIED" => Some(Self::Unspecified),
            "PRESIGN_METHOD_GET" => Some(Self::Get),
            "PRESIGN_METHOD_PUT" => Some(Self::Put),
            "PRESIGN_METHOD_DELETE" => Some(Self::Delete),
            "PRESIGN_METHOD_HEAD" => Some(Self::Head),
            _ => None,
        }
    }
}
/// GetSecretRequest looks up one named secret.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSecretRequest {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// GetSecretResponse returns the secret value.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSecretResponse {
    #[prost(string, tag = "1")]
    pub value: ::prost::alloc::string::String,
}
/// HelloWorldRequest carries no input fields. It exists to exercise the
/// provider-kind-specific request/response path.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HelloWorldRequest {}
/// HelloWorldResponse returns the fixed test-provider message.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct HelloWorldResponse {
    #[prost(string, tag = "1")]
    pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BoundWorkflowTarget {
    #[prost(message, repeated, tag = "8")]
    pub steps: ::prost::alloc::vec::Vec<WorkflowStep>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStep {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(btree_map = "string, message", tag = "2")]
    pub inputs:
        ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, WorkflowValue>,
    #[prost(message, optional, tag = "3")]
    pub when: ::core::option::Option<WorkflowStepWhen>,
    #[prost(int32, tag = "4")]
    pub timeout_seconds: i32,
    #[prost(message, optional, tag = "6")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(oneof = "workflow_step::Action", tags = "10, 11")]
    pub action: ::core::option::Option<workflow_step::Action>,
}
/// Nested message and enum types in `WorkflowStep`.
pub mod workflow_step {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Action {
        #[prost(message, tag = "10")]
        App(super::WorkflowStepAppCall),
        #[prost(message, tag = "11")]
        Agent(super::WorkflowStepAgentTurn),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStepAppCall {
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub operation: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub input: ::core::option::Option<WorkflowValue>,
    #[prost(string, tag = "4")]
    pub connection: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub instance: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub credential_mode: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStepAgentTurn {
    #[prost(string, tag = "1")]
    pub provider: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub model: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub session_key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub prompt: ::core::option::Option<WorkflowText>,
    #[prost(message, repeated, tag = "5")]
    pub messages: ::prost::alloc::vec::Vec<WorkflowAgentMessage>,
    #[prost(message, repeated, tag = "6")]
    pub tools: ::prost::alloc::vec::Vec<AgentToolRef>,
    #[prost(message, optional, tag = "7")]
    pub output: ::core::option::Option<AgentOutput>,
    #[prost(message, optional, tag = "8")]
    pub model_options: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowAgentMessage {
    #[prost(string, tag = "1")]
    pub role: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub text: ::core::option::Option<WorkflowText>,
    #[prost(message, optional, tag = "3")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowText {
    #[prost(string, tag = "1")]
    pub template: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStepWhen {
    #[prost(message, optional, tag = "1")]
    pub value: ::core::option::Option<WorkflowValue>,
    #[prost(message, optional, tag = "2")]
    pub equals: ::core::option::Option<::prost_types::Value>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowValue {
    #[prost(oneof = "workflow_value::Kind", tags = "1, 2, 3, 4, 5, 6, 9, 12")]
    pub kind: ::core::option::Option<workflow_value::Kind>,
}
/// Nested message and enum types in `WorkflowValue`.
pub mod workflow_value {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(message, tag = "1")]
        Literal(::prost_types::Value),
        #[prost(message, tag = "2")]
        Object(super::WorkflowObject),
        #[prost(message, tag = "3")]
        Array(super::WorkflowArray),
        #[prost(message, tag = "4")]
        Template(super::WorkflowText),
        #[prost(message, tag = "5")]
        Input(super::WorkflowPathSource),
        #[prost(message, tag = "6")]
        Signal(super::WorkflowPathSource),
        #[prost(message, tag = "9")]
        StepOutput(super::WorkflowStepOutputSource),
        #[prost(message, tag = "12")]
        StepInput(super::WorkflowStepInputSource),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowObject {
    #[prost(btree_map = "string, message", tag = "1")]
    pub fields:
        ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, WorkflowValue>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowArray {
    #[prost(message, repeated, tag = "1")]
    pub values: ::prost::alloc::vec::Vec<WorkflowValue>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowPathSource {
    #[prost(string, tag = "1")]
    pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowStepOutputSource {
    #[prost(string, tag = "1")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowStepInputSource {
    #[prost(string, tag = "1")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub path: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowEvent {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub source: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub spec_version: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub subject: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub time: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "7")]
    pub datacontenttype: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub data: ::core::option::Option<::prost_types::Struct>,
    #[prost(btree_map = "string, message", tag = "9")]
    pub extensions:
        ::prost::alloc::collections::BTreeMap<::prost::alloc::string::String, ::prost_types::Value>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowEventMatch {
    #[prost(string, tag = "1")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub source: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub subject: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowScheduleActivation {
    #[prost(string, tag = "1")]
    pub cron: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub timezone: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowEventActivation {
    #[prost(message, optional, tag = "1")]
    pub r#match: ::core::option::Option<WorkflowEventMatch>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowActivation {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub input: ::core::option::Option<WorkflowValue>,
    #[prost(bool, tag = "3")]
    pub paused: bool,
    #[prost(oneof = "workflow_activation::Trigger", tags = "4, 5")]
    pub trigger: ::core::option::Option<workflow_activation::Trigger>,
}
/// Nested message and enum types in `WorkflowActivation`.
pub mod workflow_activation {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Trigger {
        #[prost(message, tag = "4")]
        Schedule(super::WorkflowScheduleActivation),
        #[prost(message, tag = "5")]
        Event(super::WorkflowEventActivation),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowDefinitionSpec {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub target: ::core::option::Option<BoundWorkflowTarget>,
    #[prost(message, repeated, tag = "3")]
    pub activations: ::prost::alloc::vec::Vec<WorkflowActivation>,
    #[prost(bool, tag = "4")]
    pub paused: bool,
    #[prost(message, optional, tag = "5")]
    pub run_as: ::core::option::Option<SubjectContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowDefinition {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(int64, tag = "2")]
    pub generation: i64,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<BoundWorkflowTarget>,
    #[prost(message, repeated, tag = "4")]
    pub activations: ::prost::alloc::vec::Vec<WorkflowActivation>,
    #[prost(bool, tag = "5")]
    pub paused: bool,
    #[prost(string, tag = "6")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "8")]
    pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "9")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "10")]
    pub run_as: ::core::option::Option<SubjectContext>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowManualTrigger {}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkflowScheduleTrigger {
    #[prost(string, tag = "1")]
    pub activation_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub scheduled_for: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowEventTriggerInvocation {
    #[prost(string, tag = "1")]
    pub activation_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub event: ::core::option::Option<WorkflowEvent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowRunTrigger {
    #[prost(oneof = "workflow_run_trigger::Kind", tags = "1, 2, 3")]
    pub kind: ::core::option::Option<workflow_run_trigger::Kind>,
}
/// Nested message and enum types in `WorkflowRunTrigger`.
pub mod workflow_run_trigger {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Kind {
        #[prost(message, tag = "1")]
        Manual(super::WorkflowManualTrigger),
        #[prost(message, tag = "2")]
        Schedule(super::WorkflowScheduleTrigger),
        #[prost(message, tag = "3")]
        Event(super::WorkflowEventTriggerInvocation),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStepAttempt {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration = "WorkflowStepStatus", tag = "2")]
    pub status: i32,
    #[prost(string, tag = "3")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub input: ::core::option::Option<::prost_types::Value>,
    #[prost(message, optional, tag = "5")]
    pub output: ::core::option::Option<::prost_types::Value>,
    #[prost(string, tag = "6")]
    pub status_message: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "7")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "8")]
    pub completed_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowStepExecution {
    #[prost(string, tag = "1")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(enumeration = "WorkflowStepStatus", tag = "2")]
    pub status: i32,
    #[prost(message, repeated, tag = "3")]
    pub attempts: ::prost::alloc::vec::Vec<WorkflowStepAttempt>,
    #[prost(message, optional, tag = "4")]
    pub input: ::core::option::Option<::prost_types::Value>,
    #[prost(message, optional, tag = "5")]
    pub output: ::core::option::Option<::prost_types::Value>,
    #[prost(string, tag = "6")]
    pub status_message: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub skip_reason: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "8")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "9")]
    pub completed_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowRun {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration = "WorkflowRunStatus", tag = "2")]
    pub status: i32,
    #[prost(message, optional, tag = "3")]
    pub target: ::core::option::Option<BoundWorkflowTarget>,
    #[prost(message, optional, tag = "4")]
    pub trigger: ::core::option::Option<WorkflowRunTrigger>,
    #[prost(message, optional, tag = "5")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "6")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag = "7")]
    pub completed_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "8")]
    pub status_message: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "9")]
    pub output: ::core::option::Option<::prost_types::Value>,
    #[prost(string, tag = "10")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "12")]
    pub workflow_key: ::prost::alloc::string::String,
    #[prost(string, tag = "13")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "14")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "15")]
    pub run_as: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "16")]
    pub input: ::core::option::Option<::prost_types::Struct>,
    #[prost(int64, tag = "17")]
    pub definition_generation: i64,
    #[prost(string, tag = "18")]
    pub current_step_id: ::prost::alloc::string::String,
    #[prost(message, repeated, tag = "19")]
    pub steps: ::prost::alloc::vec::Vec<WorkflowStepExecution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowSignal {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub payload: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "4")]
    pub metadata: ::core::option::Option<::prost_types::Struct>,
    #[prost(string, tag = "5")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(string, tag = "7")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(int64, tag = "8")]
    pub sequence: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ApplyWorkflowProviderDefinitionRequest {
    #[prost(string, tag = "1")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub spec: ::core::option::Option<WorkflowDefinitionSpec>,
    #[prost(string, tag = "4")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub requested_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderDefinitionRequest {
    #[prost(string, tag = "1")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowProviderDefinitionsRequest {
    #[prost(message, optional, tag = "2")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowProviderDefinitionsResponse {
    #[prost(message, repeated, tag = "1")]
    pub definitions: ::prost::alloc::vec::Vec<WorkflowDefinition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetWorkflowProviderDefinitionPausedRequest {
    #[prost(string, tag = "1")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "2")]
    pub paused: bool,
    #[prost(string, tag = "4")]
    pub requested_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetWorkflowProviderActivationPausedRequest {
    #[prost(string, tag = "1")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub activation_id: ::prost::alloc::string::String,
    #[prost(bool, tag = "3")]
    pub paused: bool,
    #[prost(string, tag = "5")]
    pub requested_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteWorkflowProviderDefinitionRequest {
    #[prost(string, tag = "1")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartWorkflowProviderRunRequest {
    #[prost(string, tag = "2")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "6")]
    pub workflow_key: ::prost::alloc::string::String,
    #[prost(string, tag = "7")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "10")]
    pub run_as: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "11")]
    pub input: ::core::option::Option<::prost_types::Struct>,
    #[prost(int64, tag = "12")]
    pub expected_definition_generation: i64,
    #[prost(message, optional, tag = "13")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderRunRequest {
    #[prost(string, tag = "2")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "4")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowProviderRunsRequest {
    #[prost(int32, tag = "1")]
    pub page_size: i32,
    #[prost(string, tag = "2")]
    pub page_token: ::prost::alloc::string::String,
    #[prost(enumeration = "WorkflowRunStatus", tag = "3")]
    pub status: i32,
    #[prost(string, tag = "5")]
    pub target_app: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListWorkflowProviderRunsResponse {
    #[prost(message, repeated, tag = "1")]
    pub runs: ::prost::alloc::vec::Vec<WorkflowRun>,
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelWorkflowProviderRunRequest {
    #[prost(string, tag = "2")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub reason: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalWorkflowProviderRunRequest {
    #[prost(string, tag = "1")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub signal: ::core::option::Option<WorkflowSignal>,
    #[prost(message, optional, tag = "4")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalOrStartWorkflowProviderRunRequest {
    #[prost(string, tag = "1")]
    pub workflow_key: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub idempotency_key: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub created_by_subject_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub signal: ::core::option::Option<WorkflowSignal>,
    #[prost(string, tag = "7")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(string, tag = "9")]
    pub definition_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "10")]
    pub run_as: ::core::option::Option<SubjectContext>,
    #[prost(message, optional, tag = "11")]
    pub input: ::core::option::Option<::prost_types::Struct>,
    #[prost(int64, tag = "12")]
    pub expected_definition_generation: i64,
    #[prost(message, optional, tag = "13")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SignalWorkflowRunResponse {
    #[prost(message, optional, tag = "1")]
    pub run: ::core::option::Option<WorkflowRun>,
    #[prost(message, optional, tag = "2")]
    pub signal: ::core::option::Option<WorkflowSignal>,
    #[prost(bool, tag = "3")]
    pub started_run: bool,
    #[prost(string, tag = "4")]
    pub workflow_key: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeliverWorkflowProviderEventRequest {
    #[prost(string, tag = "1")]
    pub app_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "2")]
    pub event: ::core::option::Option<WorkflowEvent>,
    #[prost(string, tag = "3")]
    pub delivered_by_subject_id: ::prost::alloc::string::String,
    #[prost(string, tag = "5")]
    pub provider_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "6")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowRunEvent {
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag = "2")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(string, tag = "3")]
    pub step_id: ::prost::alloc::string::String,
    #[prost(string, tag = "4")]
    pub r#type: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "5")]
    pub data: ::core::option::Option<::prost_types::Struct>,
    #[prost(message, optional, tag = "6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderRunEventsRequest {
    #[prost(string, tag = "1")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderRunEventsResponse {
    #[prost(message, repeated, tag = "1")]
    pub events: ::prost::alloc::vec::Vec<WorkflowRunEvent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderRunOutputRequest {
    #[prost(string, tag = "1")]
    pub run_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag = "3")]
    pub context: ::core::option::Option<RequestContext>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetWorkflowProviderRunOutputResponse {
    #[prost(message, optional, tag = "1")]
    pub output: ::core::option::Option<::prost_types::Value>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkflowRunStatus {
    Unspecified = 0,
    Pending = 1,
    Running = 2,
    Succeeded = 3,
    Failed = 4,
    Canceled = 5,
}
impl WorkflowRunStatus {
    /// 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 => "WORKFLOW_RUN_STATUS_UNSPECIFIED",
            Self::Pending => "WORKFLOW_RUN_STATUS_PENDING",
            Self::Running => "WORKFLOW_RUN_STATUS_RUNNING",
            Self::Succeeded => "WORKFLOW_RUN_STATUS_SUCCEEDED",
            Self::Failed => "WORKFLOW_RUN_STATUS_FAILED",
            Self::Canceled => "WORKFLOW_RUN_STATUS_CANCELED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WORKFLOW_RUN_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "WORKFLOW_RUN_STATUS_PENDING" => Some(Self::Pending),
            "WORKFLOW_RUN_STATUS_RUNNING" => Some(Self::Running),
            "WORKFLOW_RUN_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "WORKFLOW_RUN_STATUS_FAILED" => Some(Self::Failed),
            "WORKFLOW_RUN_STATUS_CANCELED" => Some(Self::Canceled),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkflowStepStatus {
    Unspecified = 0,
    Pending = 1,
    Running = 2,
    Skipped = 3,
    Succeeded = 4,
    Failed = 5,
    Unknown = 6,
}
impl WorkflowStepStatus {
    /// 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 => "WORKFLOW_STEP_STATUS_UNSPECIFIED",
            Self::Pending => "WORKFLOW_STEP_STATUS_PENDING",
            Self::Running => "WORKFLOW_STEP_STATUS_RUNNING",
            Self::Skipped => "WORKFLOW_STEP_STATUS_SKIPPED",
            Self::Succeeded => "WORKFLOW_STEP_STATUS_SUCCEEDED",
            Self::Failed => "WORKFLOW_STEP_STATUS_FAILED",
            Self::Unknown => "WORKFLOW_STEP_STATUS_UNKNOWN",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "WORKFLOW_STEP_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "WORKFLOW_STEP_STATUS_PENDING" => Some(Self::Pending),
            "WORKFLOW_STEP_STATUS_RUNNING" => Some(Self::Running),
            "WORKFLOW_STEP_STATUS_SKIPPED" => Some(Self::Skipped),
            "WORKFLOW_STEP_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "WORKFLOW_STEP_STATUS_FAILED" => Some(Self::Failed),
            "WORKFLOW_STEP_STATUS_UNKNOWN" => Some(Self::Unknown),
            _ => None,
        }
    }
}
include!("gestalt.provider.v1.tonic.rs");
// @@protoc_insertion_point(module)
