// @generated
// This file is @generated by prost-build.
// ─── Core types ──────────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct App {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub description: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="5")]
    pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag="6")]
    pub suspended: bool,
    #[prost(message, optional, tag="7")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AppToken {
    #[prost(string, tag="1")]
    pub token_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="4")]
    pub last_used: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(bool, tag="5")]
    pub revoked: bool,
    #[prost(message, optional, tag="6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
// ─── App lifecycle ───────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAppRequest {
    #[prost(string, tag="1")]
    pub organisation_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(string, repeated, tag="4")]
    pub permissions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAppResponse {
    #[prost(message, optional, tag="1")]
    pub app: ::core::option::Option<App>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAppRequest {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAppResponse {
    #[prost(message, optional, tag="1")]
    pub app: ::core::option::Option<App>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAppsRequest {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAppsResponse {
    #[prost(message, repeated, tag="1")]
    pub apps: ::prost::alloc::vec::Vec<App>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteAppRequest {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteAppResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SuspendAppRequest {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
    #[prost(bool, tag="2")]
    pub suspended: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SuspendAppResponse {
}
// ─── App tokens ──────────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAppTokenRequest {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    /// 0 = no expiry
    #[prost(int64, tag="3")]
    pub expires_in_seconds: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateAppTokenResponse {
    #[prost(message, optional, tag="1")]
    pub token: ::core::option::Option<AppToken>,
    /// only returned on creation
    #[prost(string, tag="2")]
    pub raw_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAppTokensRequest {
    #[prost(string, tag="1")]
    pub app_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAppTokensResponse {
    #[prost(message, repeated, tag="1")]
    pub tokens: ::prost::alloc::vec::Vec<AppToken>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RevokeAppTokenRequest {
    #[prost(string, tag="1")]
    pub token_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RevokeAppTokenResponse {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginUploadArtifactRequest {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginUploadArtifactResponse {
    #[prost(string, tag="1")]
    pub upload_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UploadArtifactRequest {
    #[prost(string, tag="1")]
    pub upload_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub env: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub file_name: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub file_content: ::prost::alloc::string::String,
    /// Category of the file: "deployment" (default), "spec", or "attachment"
    #[prost(string, tag="6")]
    pub category: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UploadArtifactResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitArtifactRequest {
    #[prost(string, tag="1")]
    pub upload_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitArtifactResponse {
    #[prost(string, tag="1")]
    pub artifact_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetArtifactFilesRequest {
    #[prost(string, tag="1")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub category: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetArtifactFilesResponse {
    #[prost(message, repeated, tag="1")]
    pub files: ::prost::alloc::vec::Vec<ArtifactFile>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArtifactFile {
    #[prost(string, tag="1")]
    pub file_name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub category: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub env: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub content: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetArtifactSpecRequest {
    #[prost(string, tag="1")]
    pub artifact_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetArtifactSpecResponse {
    #[prost(string, tag="1")]
    pub content: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateDestinationRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub environment: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="3")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    #[prost(message, optional, tag="4")]
    pub r#type: ::core::option::Option<DestinationType>,
    #[prost(string, tag="5")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateDestinationResponse {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateDestinationRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="2")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateDestinationResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteDestinationRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteDestinationResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetDestinationsRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDestinationsResponse {
    #[prost(message, repeated, tag="1")]
    pub destinations: ::prost::alloc::vec::Vec<Destination>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListDestinationTypesRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListDestinationTypesResponse {
    #[prost(message, repeated, tag="1")]
    pub types: ::prost::alloc::vec::Vec<DestinationType>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Destination {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub environment: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="3")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    #[prost(message, optional, tag="4")]
    pub r#type: ::core::option::Option<DestinationType>,
    #[prost(string, tag="5")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DestinationType {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(uint64, tag="3")]
    pub version: u64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Environment {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, tag="5")]
    pub sort_order: i32,
    #[prost(string, tag="6")]
    pub created_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateEnvironmentRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, tag="4")]
    pub sort_order: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateEnvironmentResponse {
    #[prost(message, optional, tag="1")]
    pub environment: ::core::option::Option<Environment>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetEnvironmentRequest {
    #[prost(oneof="get_environment_request::Identifier", tags="1, 2")]
    pub identifier: ::core::option::Option<get_environment_request::Identifier>,
}
/// Nested message and enum types in `GetEnvironmentRequest`.
pub mod get_environment_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(string, tag="1")]
        Id(::prost::alloc::string::String),
        #[prost(message, tag="2")]
        Lookup(super::EnvironmentLookup),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnvironmentLookup {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetEnvironmentResponse {
    #[prost(message, optional, tag="1")]
    pub environment: ::core::option::Option<Environment>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEnvironmentsRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEnvironmentsResponse {
    #[prost(message, repeated, tag="1")]
    pub environments: ::prost::alloc::vec::Vec<Environment>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateEnvironmentRequest {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="3")]
    pub sort_order: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateEnvironmentResponse {
    #[prost(message, optional, tag="1")]
    pub environment: ::core::option::Option<Environment>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEnvironmentRequest {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEnvironmentResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeEventsRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    /// optional — empty means all projects in org
    #[prost(string, tag="2")]
    pub project: ::prost::alloc::string::String,
    /// optional filter: "release", "destination", etc.
    #[prost(string, repeated, tag="3")]
    pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// optional filter: "created", "updated", etc.
    #[prost(string, repeated, tag="4")]
    pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// 0 = latest only, >0 = replay from that sequence
    #[prost(int64, tag="5")]
    pub since_sequence: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SubscribeDurableRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    /// the registered subscription name
    #[prost(string, tag="2")]
    pub subscription_name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AcknowledgeEventsRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub subscription_name: ::prost::alloc::string::String,
    /// advance cursor to this sequence
    #[prost(int64, tag="3")]
    pub sequence: i64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AcknowledgeEventsResponse {
    /// the new cursor value
    #[prost(int64, tag="1")]
    pub cursor: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OrgEvent {
    /// monotonic cursor — client stores this for reconnect
    #[prost(int64, tag="1")]
    pub sequence: i64,
    /// UUID, dedup key
    #[prost(string, tag="2")]
    pub event_id: ::prost::alloc::string::String,
    /// RFC 3339
    #[prost(string, tag="3")]
    pub timestamp: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub organisation: ::prost::alloc::string::String,
    /// empty for org-level events
    #[prost(string, tag="5")]
    pub project: ::prost::alloc::string::String,
    /// "release", "destination", "environment", "pipeline", "artifact", "policy", "app", "organisation"
    #[prost(string, tag="6")]
    pub resource_type: ::prost::alloc::string::String,
    /// "created", "updated", "deleted", "status_changed"
    #[prost(string, tag="7")]
    pub action: ::prost::alloc::string::String,
    /// ID of the changed resource
    #[prost(string, tag="8")]
    pub resource_id: ::prost::alloc::string::String,
    /// lightweight context (e.g. "status" → "SUCCEEDED")
    #[prost(map="string, string", tag="9")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EventSubscription {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="4")]
    pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="5")]
    pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="6")]
    pub projects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// "active", "paused"
    #[prost(string, tag="7")]
    pub status: ::prost::alloc::string::String,
    /// last acknowledged sequence
    #[prost(int64, tag="8")]
    pub cursor: i64,
    #[prost(string, tag="9")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub updated_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateEventSubscriptionRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    /// empty = all
    #[prost(string, repeated, tag="3")]
    pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// empty = all
    #[prost(string, repeated, tag="4")]
    pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// empty = all projects in org
    #[prost(string, repeated, tag="5")]
    pub projects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateEventSubscriptionResponse {
    #[prost(message, optional, tag="1")]
    pub subscription: ::core::option::Option<EventSubscription>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateEventSubscriptionRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    /// "active" or "paused"
    #[prost(string, optional, tag="3")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    /// To update filters, set update_filters = true and provide new values.
    /// Empty arrays mean "all" (no filter).
    #[prost(bool, tag="4")]
    pub update_filters: bool,
    #[prost(string, repeated, tag="5")]
    pub resource_types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="6")]
    pub actions: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="7")]
    pub projects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateEventSubscriptionResponse {
    #[prost(message, optional, tag="1")]
    pub subscription: ::core::option::Option<EventSubscription>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEventSubscriptionRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteEventSubscriptionResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListEventSubscriptionsRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEventSubscriptionsResponse {
    #[prost(message, repeated, tag="1")]
    pub subscriptions: ::prost::alloc::vec::Vec<EventSubscription>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetStatusRequest {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetStatusResponse {
}
/// Rich context about the release that triggered the notification.
/// Integrations decide which fields to use.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseContext {
    #[prost(string, tag="1")]
    pub slug: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub project: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub environment: ::prost::alloc::string::String,
    /// Source info
    #[prost(string, tag="8")]
    pub source_username: ::prost::alloc::string::String,
    #[prost(string, tag="9")]
    pub source_email: ::prost::alloc::string::String,
    /// Git ref
    #[prost(string, tag="10")]
    pub commit_sha: ::prost::alloc::string::String,
    #[prost(string, tag="11")]
    pub commit_branch: ::prost::alloc::string::String,
    /// Artifact context
    #[prost(string, tag="12")]
    pub context_title: ::prost::alloc::string::String,
    #[prost(string, tag="13")]
    pub context_description: ::prost::alloc::string::String,
    #[prost(string, tag="14")]
    pub context_web: ::prost::alloc::string::String,
    /// Error info (populated on failure)
    #[prost(string, tag="15")]
    pub error_message: ::prost::alloc::string::String,
    /// Number of destinations involved
    #[prost(int32, tag="16")]
    pub destination_count: i32,
    #[prost(string, tag="17")]
    pub source_user_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Notification {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(enumeration="NotificationType", tag="2")]
    pub notification_type: i32,
    #[prost(string, tag="3")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub body: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub project: ::prost::alloc::string::String,
    #[prost(message, optional, tag="7")]
    pub release_context: ::core::option::Option<ReleaseContext>,
    #[prost(string, tag="8")]
    pub created_at: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct NotificationPreference {
    #[prost(enumeration="NotificationType", tag="1")]
    pub notification_type: i32,
    #[prost(enumeration="NotificationChannel", tag="2")]
    pub channel: i32,
    #[prost(bool, tag="3")]
    pub enabled: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetNotificationPreferencesRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetNotificationPreferencesResponse {
    #[prost(message, repeated, tag="1")]
    pub preferences: ::prost::alloc::vec::Vec<NotificationPreference>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetNotificationPreferenceRequest {
    #[prost(enumeration="NotificationType", tag="1")]
    pub notification_type: i32,
    #[prost(enumeration="NotificationChannel", tag="2")]
    pub channel: i32,
    #[prost(bool, tag="3")]
    pub enabled: bool,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetNotificationPreferenceResponse {
    #[prost(message, optional, tag="1")]
    pub preference: ::core::option::Option<NotificationPreference>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListenNotificationsRequest {
    #[prost(string, optional, tag="1")]
    pub organisation: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="2")]
    pub project: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListNotificationsRequest {
    #[prost(int32, tag="1")]
    pub page_size: i32,
    #[prost(string, tag="2")]
    pub page_token: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub organisation: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub project: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListNotificationsResponse {
    #[prost(message, repeated, tag="1")]
    pub notifications: ::prost::alloc::vec::Vec<Notification>,
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NotificationType {
    Unspecified = 0,
    ReleaseAnnotated = 1,
    ReleaseStarted = 2,
    ReleaseSucceeded = 3,
    ReleaseFailed = 4,
}
impl NotificationType {
    /// 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 => "NOTIFICATION_TYPE_UNSPECIFIED",
            Self::ReleaseAnnotated => "NOTIFICATION_TYPE_RELEASE_ANNOTATED",
            Self::ReleaseStarted => "NOTIFICATION_TYPE_RELEASE_STARTED",
            Self::ReleaseSucceeded => "NOTIFICATION_TYPE_RELEASE_SUCCEEDED",
            Self::ReleaseFailed => "NOTIFICATION_TYPE_RELEASE_FAILED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NOTIFICATION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "NOTIFICATION_TYPE_RELEASE_ANNOTATED" => Some(Self::ReleaseAnnotated),
            "NOTIFICATION_TYPE_RELEASE_STARTED" => Some(Self::ReleaseStarted),
            "NOTIFICATION_TYPE_RELEASE_SUCCEEDED" => Some(Self::ReleaseSucceeded),
            "NOTIFICATION_TYPE_RELEASE_FAILED" => Some(Self::ReleaseFailed),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NotificationChannel {
    Unspecified = 0,
    Cli = 1,
    Slack = 2,
}
impl NotificationChannel {
    /// 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 => "NOTIFICATION_CHANNEL_UNSPECIFIED",
            Self::Cli => "NOTIFICATION_CHANNEL_CLI",
            Self::Slack => "NOTIFICATION_CHANNEL_SLACK",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NOTIFICATION_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
            "NOTIFICATION_CHANNEL_CLI" => Some(Self::Cli),
            "NOTIFICATION_CHANNEL_SLACK" => Some(Self::Slack),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Organisation {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::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 CreateOrganisationRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateOrganisationResponse {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrganisationRequest {
    #[prost(oneof="get_organisation_request::Identifier", tags="1, 2")]
    pub identifier: ::core::option::Option<get_organisation_request::Identifier>,
}
/// Nested message and enum types in `GetOrganisationRequest`.
pub mod get_organisation_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(string, tag="1")]
        OrganisationId(::prost::alloc::string::String),
        #[prost(string, tag="2")]
        Name(::prost::alloc::string::String),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrganisationResponse {
    #[prost(message, optional, tag="1")]
    pub organisation: ::core::option::Option<Organisation>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchOrganisationsRequest {
    #[prost(string, tag="1")]
    pub query: ::prost::alloc::string::String,
    #[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 SearchOrganisationsResponse {
    #[prost(message, repeated, tag="1")]
    pub organisations: ::prost::alloc::vec::Vec<Organisation>,
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMyOrganisationsRequest {
    /// Optional role filter (e.g. "admin"); empty means all roles
    #[prost(string, tag="1")]
    pub role: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListMyOrganisationsResponse {
    #[prost(message, repeated, tag="1")]
    pub organisations: ::prost::alloc::vec::Vec<Organisation>,
    /// The role the caller has in each organisation (parallel to organisations)
    #[prost(string, repeated, tag="2")]
    pub roles: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
// -- Members ------------------------------------------------------------------

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrganisationMember {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub username: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub role: ::prost::alloc::string::String,
    #[prost(message, optional, tag="4")]
    pub joined_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddMemberRequest {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub role: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddMemberResponse {
    #[prost(message, optional, tag="1")]
    pub member: ::core::option::Option<OrganisationMember>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveMemberRequest {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub user_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveMemberResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateMemberRoleRequest {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub role: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateMemberRoleResponse {
    #[prost(message, optional, tag="1")]
    pub member: ::core::option::Option<OrganisationMember>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListMembersRequest {
    #[prost(string, tag="1")]
    pub organisation_id: ::prost::alloc::string::String,
    #[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 ListMembersResponse {
    #[prost(message, repeated, tag="1")]
    pub members: ::prost::alloc::vec::Vec<OrganisationMember>,
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotateReleaseRequest {
    #[prost(string, tag="1")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="2")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    #[prost(message, optional, tag="3")]
    pub source: ::core::option::Option<Source>,
    #[prost(message, optional, tag="4")]
    pub context: ::core::option::Option<ArtifactContext>,
    #[prost(message, optional, tag="5")]
    pub project: ::core::option::Option<Project>,
    #[prost(message, optional, tag="6")]
    pub r#ref: ::core::option::Option<Ref>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AnnotateReleaseResponse {
    #[prost(message, optional, tag="1")]
    pub artifact: ::core::option::Option<Artifact>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetArtifactBySlugRequest {
    #[prost(string, tag="1")]
    pub slug: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetArtifactBySlugResponse {
    #[prost(message, optional, tag="1")]
    pub artifact: ::core::option::Option<Artifact>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetArtifactsByProjectRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetArtifactsByProjectResponse {
    #[prost(message, repeated, tag="1")]
    pub artifact: ::prost::alloc::vec::Vec<Artifact>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseRequest {
    #[prost(string, tag="1")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="2")]
    pub destinations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="3")]
    pub environments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag="4")]
    pub force: bool,
    /// When true, use the project's release pipeline (DAG) instead of
    /// deploying directly to the specified destinations/environments.
    #[prost(bool, tag="5")]
    pub use_pipeline: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseResponse {
    /// List of release intents created (one per destination)
    #[prost(message, repeated, tag="1")]
    pub intents: ::prost::alloc::vec::Vec<ReleaseIntent>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseIntent {
    #[prost(string, tag="1")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub environment: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitReleaseRequest {
    #[prost(string, tag="1")]
    pub release_intent_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitReleaseEvent {
    #[prost(oneof="wait_release_event::Event", tags="1, 2, 3")]
    pub event: ::core::option::Option<wait_release_event::Event>,
}
/// Nested message and enum types in `WaitReleaseEvent`.
pub mod wait_release_event {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Event {
        #[prost(message, tag="1")]
        StatusUpdate(super::ReleaseStatusUpdate),
        #[prost(message, tag="2")]
        LogLine(super::ReleaseLogLine),
        #[prost(message, tag="3")]
        StageUpdate(super::PipelineStageUpdate),
    }
}
/// Streamed in WaitRelease for pipeline releases: reports stage status changes.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PipelineStageUpdate {
    #[prost(string, tag="1")]
    pub stage_id: ::prost::alloc::string::String,
    /// "deploy", "wait"
    #[prost(string, tag="2")]
    pub stage_type: ::prost::alloc::string::String,
    /// PENDING, ACTIVE, SUCCEEDED, FAILED, CANCELLED
    #[prost(string, tag="3")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub queued_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub started_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub completed_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub wait_until: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseStatusUpdate {
    #[prost(string, tag="1")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub status: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseLogLine {
    #[prost(string, tag="1")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub line: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub timestamp: ::prost::alloc::string::String,
    #[prost(enumeration="LogChannel", tag="4")]
    pub channel: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetOrganisationsRequest {
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetOrganisationsResponse {
    #[prost(message, repeated, tag="1")]
    pub organisations: ::prost::alloc::vec::Vec<OrganisationRef>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProjectsRequest {
    #[prost(oneof="get_projects_request::Query", tags="1")]
    pub query: ::core::option::Option<get_projects_request::Query>,
}
/// Nested message and enum types in `GetProjectsRequest`.
pub mod get_projects_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Query {
        #[prost(message, tag="1")]
        Organisation(super::OrganisationRef),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProjectsResponse {
    #[prost(string, repeated, tag="1")]
    pub projects: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateProjectRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateProjectResponse {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetReleasesByActorRequest {
    /// user_id or app_id
    #[prost(string, tag="1")]
    pub actor_id: ::prost::alloc::string::String,
    /// "user" or "app"
    #[prost(string, tag="2")]
    pub actor_type: ::prost::alloc::string::String,
    #[prost(int32, tag="3")]
    pub page_size: i32,
    #[prost(string, tag="4")]
    pub page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReleasesByActorResponse {
    #[prost(message, repeated, tag="1")]
    pub releases: ::prost::alloc::vec::Vec<ReleaseIntentSummary>,
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseIntentSummary {
    #[prost(string, tag="1")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub project: ::core::option::Option<Project>,
    #[prost(message, repeated, tag="4")]
    pub destinations: ::prost::alloc::vec::Vec<ReleaseDestinationStatus>,
    #[prost(string, tag="5")]
    pub created_at: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseDestinationStatus {
    #[prost(string, tag="1")]
    pub destination: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub environment: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub status: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetDestinationStatesRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub project: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetDestinationStatesResponse {
    #[prost(message, repeated, tag="1")]
    pub destinations: ::prost::alloc::vec::Vec<DestinationState>,
    /// Active pipeline runs affecting these destinations (if any).
    #[prost(message, repeated, tag="2")]
    pub pipeline_runs: ::prost::alloc::vec::Vec<PipelineRunState>,
}
// ── Release intent states (release-centric view) ─────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetReleaseIntentStatesRequest {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub project: ::core::option::Option<::prost::alloc::string::String>,
    /// When true, also include recently completed release intents.
    #[prost(bool, tag="3")]
    pub include_completed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetReleaseIntentStatesResponse {
    #[prost(message, repeated, tag="1")]
    pub release_intents: ::prost::alloc::vec::Vec<ReleaseIntentState>,
}
/// Full state of a release intent: pipeline stages + individual release steps.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleaseIntentState {
    #[prost(string, tag="1")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub project: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub created_at: ::prost::alloc::string::String,
    /// Pipeline stages (empty for non-pipeline releases).
    #[prost(message, repeated, tag="5")]
    pub stages: ::prost::alloc::vec::Vec<PipelineStageState>,
    /// All release_states rows for this intent (deploy steps).
    #[prost(message, repeated, tag="6")]
    pub steps: ::prost::alloc::vec::Vec<ReleaseStepState>,
}
/// Status of a single pipeline stage (saga coordinator view).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PipelineStageState {
    #[prost(string, tag="1")]
    pub stage_id: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="2")]
    pub depends_on: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration="PipelineRunStageType", tag="3")]
    pub stage_type: i32,
    #[prost(enumeration="PipelineRunStageStatus", tag="4")]
    pub status: i32,
    /// Consistent timestamps for all stage types.
    #[prost(string, optional, tag="5")]
    pub queued_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub started_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub completed_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
    /// Type-specific context.
    ///
    /// deploy stages
    #[prost(string, optional, tag="9")]
    pub environment: ::core::option::Option<::prost::alloc::string::String>,
    /// wait stages
    #[prost(int64, optional, tag="10")]
    pub duration_seconds: ::core::option::Option<i64>,
    /// wait stages
    #[prost(string, optional, tag="11")]
    pub wait_until: ::core::option::Option<::prost::alloc::string::String>,
    /// deploy stages: individual release IDs
    #[prost(string, repeated, tag="12")]
    pub release_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Status of a single release step (release_states row).
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseStepState {
    #[prost(string, tag="1")]
    pub release_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub stage_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, tag="3")]
    pub destination_name: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub environment: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub status: ::prost::alloc::string::String,
    #[prost(string, optional, tag="6")]
    pub queued_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub assigned_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub started_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="9")]
    pub completed_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DestinationState {
    #[prost(string, tag="1")]
    pub destination_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub destination_name: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub environment: ::prost::alloc::string::String,
    #[prost(string, optional, tag="4")]
    pub release_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub artifact_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub status: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub queued_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="9")]
    pub completed_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(int32, optional, tag="10")]
    pub queue_position: ::core::option::Option<i32>,
    /// Pipeline context: set when this release was created by a pipeline stage.
    #[prost(string, optional, tag="11")]
    pub release_intent_id: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="12")]
    pub stage_id: ::core::option::Option<::prost::alloc::string::String>,
    /// When a runner was assigned to this release.
    #[prost(string, optional, tag="13")]
    pub assigned_at: ::core::option::Option<::prost::alloc::string::String>,
    /// When the runner actually started executing.
    #[prost(string, optional, tag="14")]
    pub started_at: ::core::option::Option<::prost::alloc::string::String>,
}
// ── Pipeline run progress ────────────────────────────────────────────

/// Snapshot of an active (or recently completed) pipeline run.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PipelineRunState {
    #[prost(string, tag="1")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(message, repeated, tag="4")]
    pub stages: ::prost::alloc::vec::Vec<PipelineRunStage>,
}
/// Status of a single stage within a pipeline run.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PipelineRunStage {
    #[prost(string, tag="1")]
    pub stage_id: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="2")]
    pub depends_on: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(enumeration="PipelineRunStageType", tag="3")]
    pub stage_type: i32,
    #[prost(enumeration="PipelineRunStageStatus", tag="4")]
    pub status: i32,
    /// Type-specific context
    ///
    /// deploy stages
    #[prost(string, optional, tag="5")]
    pub environment: ::core::option::Option<::prost::alloc::string::String>,
    /// wait stages
    #[prost(int64, optional, tag="6")]
    pub duration_seconds: ::core::option::Option<i64>,
    /// when dependencies were met
    #[prost(string, optional, tag="7")]
    pub queued_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub started_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="9")]
    pub completed_at: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="10")]
    pub error_message: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="11")]
    pub wait_until: ::core::option::Option<::prost::alloc::string::String>,
    /// deploy stages: individual release IDs
    #[prost(string, repeated, tag="12")]
    pub release_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Source {
    #[prost(string, optional, tag="1")]
    pub user: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="2")]
    pub email: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub source_type: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub run_url: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArtifactContext {
    #[prost(string, tag="1")]
    pub title: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub description: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub web: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub pr: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Artifact {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub slug: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="4")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    #[prost(message, optional, tag="5")]
    pub source: ::core::option::Option<Source>,
    #[prost(message, optional, tag="6")]
    pub context: ::core::option::Option<ArtifactContext>,
    #[prost(message, optional, tag="7")]
    pub project: ::core::option::Option<Project>,
    #[prost(message, repeated, tag="8")]
    pub destinations: ::prost::alloc::vec::Vec<ArtifactDestination>,
    #[prost(string, tag="9")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(message, optional, tag="10")]
    pub r#ref: ::core::option::Option<Ref>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArtifactDestination {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub environment: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub type_organisation: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub type_name: ::prost::alloc::string::String,
    #[prost(uint64, tag="5")]
    pub type_version: u64,
    #[prost(string, tag="6")]
    pub status: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Project {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub project: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Ref {
    #[prost(string, tag="1")]
    pub commit_sha: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub branch: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="3")]
    pub commit_message: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub version: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub repo_url: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OrganisationRef {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum LogChannel {
    Unspecified = 0,
    Stdout = 1,
    Stderr = 2,
}
impl LogChannel {
    /// 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 => "LOG_CHANNEL_UNSPECIFIED",
            Self::Stdout => "LOG_CHANNEL_STDOUT",
            Self::Stderr => "LOG_CHANNEL_STDERR",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "LOG_CHANNEL_UNSPECIFIED" => Some(Self::Unspecified),
            "LOG_CHANNEL_STDOUT" => Some(Self::Stdout),
            "LOG_CHANNEL_STDERR" => Some(Self::Stderr),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PipelineRunStageType {
    Unspecified = 0,
    Deploy = 1,
    Wait = 2,
}
impl PipelineRunStageType {
    /// 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 => "PIPELINE_RUN_STAGE_TYPE_UNSPECIFIED",
            Self::Deploy => "PIPELINE_RUN_STAGE_TYPE_DEPLOY",
            Self::Wait => "PIPELINE_RUN_STAGE_TYPE_WAIT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PIPELINE_RUN_STAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "PIPELINE_RUN_STAGE_TYPE_DEPLOY" => Some(Self::Deploy),
            "PIPELINE_RUN_STAGE_TYPE_WAIT" => Some(Self::Wait),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PipelineRunStageStatus {
    Unspecified = 0,
    Pending = 1,
    Active = 2,
    Succeeded = 3,
    Failed = 4,
    Cancelled = 5,
}
impl PipelineRunStageStatus {
    /// 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 => "PIPELINE_RUN_STAGE_STATUS_UNSPECIFIED",
            Self::Pending => "PIPELINE_RUN_STAGE_STATUS_PENDING",
            Self::Active => "PIPELINE_RUN_STAGE_STATUS_ACTIVE",
            Self::Succeeded => "PIPELINE_RUN_STAGE_STATUS_SUCCEEDED",
            Self::Failed => "PIPELINE_RUN_STAGE_STATUS_FAILED",
            Self::Cancelled => "PIPELINE_RUN_STAGE_STATUS_CANCELLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PIPELINE_RUN_STAGE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PIPELINE_RUN_STAGE_STATUS_PENDING" => Some(Self::Pending),
            "PIPELINE_RUN_STAGE_STATUS_ACTIVE" => Some(Self::Active),
            "PIPELINE_RUN_STAGE_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "PIPELINE_RUN_STAGE_STATUS_FAILED" => Some(Self::Failed),
            "PIPELINE_RUN_STAGE_STATUS_CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoakTimeConfig {
    /// Environment that must have a successful deploy before target is allowed
    #[prost(string, tag="1")]
    pub source_environment: ::prost::alloc::string::String,
    /// Environment that is gated by this policy
    #[prost(string, tag="2")]
    pub target_environment: ::prost::alloc::string::String,
    /// Seconds to wait after source environment succeeds
    #[prost(int64, tag="3")]
    pub duration_seconds: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BranchRestrictionConfig {
    /// Environment that is restricted
    #[prost(string, tag="1")]
    pub target_environment: ::prost::alloc::string::String,
    /// Regex that source branch must match
    #[prost(string, tag="2")]
    pub branch_pattern: ::prost::alloc::string::String,
}
// ── Policy resource ─────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Policy {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, tag="3")]
    pub enabled: bool,
    #[prost(enumeration="PolicyType", tag="4")]
    pub policy_type: i32,
    #[prost(string, tag="20")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, tag="21")]
    pub updated_at: ::prost::alloc::string::String,
    #[prost(oneof="policy::Config", tags="10, 11")]
    pub config: ::core::option::Option<policy::Config>,
}
/// Nested message and enum types in `Policy`.
pub mod policy {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Config {
        #[prost(message, tag="10")]
        SoakTime(super::SoakTimeConfig),
        #[prost(message, tag="11")]
        BranchRestriction(super::BranchRestrictionConfig),
    }
}
// ── Policy evaluation result ────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PolicyEvaluation {
    #[prost(string, tag="1")]
    pub policy_name: ::prost::alloc::string::String,
    #[prost(enumeration="PolicyType", tag="2")]
    pub policy_type: i32,
    #[prost(bool, tag="3")]
    pub passed: bool,
    /// Human-readable explanation when blocked
    #[prost(string, tag="4")]
    pub reason: ::prost::alloc::string::String,
}
// ── CRUD messages ───────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePolicyRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(enumeration="PolicyType", tag="3")]
    pub policy_type: i32,
    #[prost(oneof="create_policy_request::Config", tags="10, 11")]
    pub config: ::core::option::Option<create_policy_request::Config>,
}
/// Nested message and enum types in `CreatePolicyRequest`.
pub mod create_policy_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Config {
        #[prost(message, tag="10")]
        SoakTime(super::SoakTimeConfig),
        #[prost(message, tag="11")]
        BranchRestriction(super::BranchRestrictionConfig),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePolicyResponse {
    #[prost(message, optional, tag="1")]
    pub policy: ::core::option::Option<Policy>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdatePolicyRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, optional, tag="3")]
    pub enabled: ::core::option::Option<bool>,
    #[prost(oneof="update_policy_request::Config", tags="10, 11")]
    pub config: ::core::option::Option<update_policy_request::Config>,
}
/// Nested message and enum types in `UpdatePolicyRequest`.
pub mod update_policy_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Config {
        #[prost(message, tag="10")]
        SoakTime(super::SoakTimeConfig),
        #[prost(message, tag="11")]
        BranchRestriction(super::BranchRestrictionConfig),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdatePolicyResponse {
    #[prost(message, optional, tag="1")]
    pub policy: ::core::option::Option<Policy>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePolicyRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePolicyResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPoliciesRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPoliciesResponse {
    #[prost(message, repeated, tag="1")]
    pub policies: ::prost::alloc::vec::Vec<Policy>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EvaluatePoliciesRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub target_environment: ::prost::alloc::string::String,
    /// For branch restriction checks
    #[prost(string, optional, tag="3")]
    pub branch: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvaluatePoliciesResponse {
    #[prost(message, repeated, tag="1")]
    pub evaluations: ::prost::alloc::vec::Vec<PolicyEvaluation>,
    #[prost(bool, tag="2")]
    pub all_passed: bool,
}
// ── Policy types ────────────────────────────────────────────────────

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PolicyType {
    Unspecified = 0,
    SoakTime = 1,
    BranchRestriction = 2,
}
impl PolicyType {
    /// 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 => "POLICY_TYPE_UNSPECIFIED",
            Self::SoakTime => "POLICY_TYPE_SOAK_TIME",
            Self::BranchRestriction => "POLICY_TYPE_BRANCH_RESTRICTION",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "POLICY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "POLICY_TYPE_SOAK_TIME" => Some(Self::SoakTime),
            "POLICY_TYPE_BRANCH_RESTRICTION" => Some(Self::BranchRestriction),
            _ => None,
        }
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentsRequest {
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentsResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentResponse {
    #[prost(message, optional, tag="1")]
    pub component: ::core::option::Option<Component>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Component {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub version: ::prost::alloc::string::String,
}
/// ComponentVersion
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentVersionRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentVersionResponse {
    #[prost(message, optional, tag="1")]
    pub component: ::core::option::Option<Component>,
}
// BeginUpload

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginUploadRequest {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub version: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct BeginUploadResponse {
    #[prost(string, tag="1")]
    pub upload_context: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UploadFileRequest {
    #[prost(string, tag="1")]
    pub upload_context: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub file_path: ::prost::alloc::string::String,
    #[prost(bytes="vec", tag="3")]
    pub file_content: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UploadFileResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitUploadRequest {
    #[prost(string, tag="1")]
    pub upload_context: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CommitUploadResponse {
}
/// Get component files
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentFilesRequest {
    #[prost(string, tag="1")]
    pub component_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetComponentFilesResponse {
    #[prost(oneof="get_component_files_response::Msg", tags="1, 2")]
    pub msg: ::core::option::Option<get_component_files_response::Msg>,
}
/// Nested message and enum types in `GetComponentFilesResponse`.
pub mod get_component_files_response {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Msg {
        #[prost(message, tag="1")]
        Done(super::Done),
        #[prost(message, tag="2")]
        ComponentFile(super::ComponentFile),
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ComponentFile {
    #[prost(string, tag="1")]
    pub file_path: ::prost::alloc::string::String,
    #[prost(bytes="vec", tag="2")]
    pub file_content: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Done {
}
// ── Per-type config messages ─────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeployStageConfig {
    #[prost(string, tag="1")]
    pub environment: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WaitStageConfig {
    #[prost(int64, tag="1")]
    pub duration_seconds: i64,
}
// ── A single pipeline stage ──────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PipelineStage {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="2")]
    pub depends_on: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(oneof="pipeline_stage::Config", tags="10, 11")]
    pub config: ::core::option::Option<pipeline_stage::Config>,
}
/// Nested message and enum types in `PipelineStage`.
pub mod pipeline_stage {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Config {
        #[prost(message, tag="10")]
        Deploy(super::DeployStageConfig),
        #[prost(message, tag="11")]
        Wait(super::WaitStageConfig),
    }
}
// ── Pipeline resource ────────────────────────────────────────────────

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReleasePipeline {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, tag="3")]
    pub enabled: bool,
    #[prost(message, repeated, tag="4")]
    pub stages: ::prost::alloc::vec::Vec<PipelineStage>,
    #[prost(string, tag="5")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub updated_at: ::prost::alloc::string::String,
}
// ── CRUD messages ────────────────────────────────────────────────────

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateReleasePipelineRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(message, repeated, tag="3")]
    pub stages: ::prost::alloc::vec::Vec<PipelineStage>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateReleasePipelineResponse {
    #[prost(message, optional, tag="1")]
    pub pipeline: ::core::option::Option<ReleasePipeline>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateReleasePipelineRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, optional, tag="3")]
    pub enabled: ::core::option::Option<bool>,
    /// When set, replaces all stages. When absent, stages are unchanged.
    #[prost(message, repeated, tag="4")]
    pub stages: ::prost::alloc::vec::Vec<PipelineStage>,
    #[prost(bool, tag="5")]
    pub update_stages: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateReleasePipelineResponse {
    #[prost(message, optional, tag="1")]
    pub pipeline: ::core::option::Option<ReleasePipeline>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteReleasePipelineRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteReleasePipelineResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListReleasePipelinesRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListReleasePipelinesResponse {
    #[prost(message, repeated, tag="1")]
    pub pipelines: ::prost::alloc::vec::Vec<ReleasePipeline>,
}
// ── Stage type enum (useful for UI dropdowns / filtering) ────────────

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum StageType {
    Unspecified = 0,
    Deploy = 1,
    Wait = 2,
}
impl StageType {
    /// 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 => "STAGE_TYPE_UNSPECIFIED",
            Self::Deploy => "STAGE_TYPE_DEPLOY",
            Self::Wait => "STAGE_TYPE_WAIT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "STAGE_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "STAGE_TYPE_DEPLOY" => Some(Self::Deploy),
            "STAGE_TYPE_WAIT" => Some(Self::Wait),
            _ => None,
        }
    }
}
// ── Runtime stage status (for observing pipeline progress) ───────────

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PipelineStageStatus {
    Unspecified = 0,
    Pending = 1,
    Active = 2,
    Succeeded = 3,
    Failed = 4,
    Cancelled = 5,
}
impl PipelineStageStatus {
    /// 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 => "PIPELINE_STAGE_STATUS_UNSPECIFIED",
            Self::Pending => "PIPELINE_STAGE_STATUS_PENDING",
            Self::Active => "PIPELINE_STAGE_STATUS_ACTIVE",
            Self::Succeeded => "PIPELINE_STAGE_STATUS_SUCCEEDED",
            Self::Failed => "PIPELINE_STAGE_STATUS_FAILED",
            Self::Cancelled => "PIPELINE_STAGE_STATUS_CANCELLED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PIPELINE_STAGE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "PIPELINE_STAGE_STATUS_PENDING" => Some(Self::Pending),
            "PIPELINE_STAGE_STATUS_ACTIVE" => Some(Self::Active),
            "PIPELINE_STAGE_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "PIPELINE_STAGE_STATUS_FAILED" => Some(Self::Failed),
            "PIPELINE_STAGE_STATUS_CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
// ============================================================================
// Connect stream: Runner → Server
// ============================================================================

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunnerMessage {
    #[prost(oneof="runner_message::Message", tags="1, 2, 3")]
    pub message: ::core::option::Option<runner_message::Message>,
}
/// Nested message and enum types in `RunnerMessage`.
pub mod runner_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Message {
        #[prost(message, tag="1")]
        Register(super::RunnerRegister),
        #[prost(message, tag="2")]
        Heartbeat(super::RunnerHeartbeat),
        #[prost(message, tag="3")]
        WorkAck(super::WorkAck),
    }
}
/// First message a runner sends on the Connect stream.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunnerRegister {
    /// Runner-chosen unique identifier. If empty, the server assigns one.
    #[prost(string, tag="1")]
    pub runner_id: ::prost::alloc::string::String,
    /// Destination types this runner can handle.
    #[prost(message, repeated, tag="2")]
    pub capabilities: ::prost::alloc::vec::Vec<DestinationCapability>,
    /// Maximum number of simultaneous releases this runner can process.
    #[prost(int32, tag="3")]
    pub max_concurrent: i32,
}
/// Describes a destination type the runner supports.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DestinationCapability {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(uint64, tag="3")]
    pub version: u64,
}
/// Periodic keepalive sent by the runner (recommended every 10s).
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RunnerHeartbeat {
    /// Current number of in-progress releases on this runner.
    #[prost(int32, tag="1")]
    pub active_releases: i32,
}
/// Runner's response to a WorkAssignment.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct WorkAck {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
    /// false = runner rejects the work (e.g., overloaded). The server will
    /// reassign or fall back to in-process execution.
    #[prost(bool, tag="2")]
    pub accepted: bool,
}
// ============================================================================
// Connect stream: Server → Runner
// ============================================================================

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ServerMessage {
    #[prost(oneof="server_message::Message", tags="1, 2")]
    pub message: ::core::option::Option<server_message::Message>,
}
/// Nested message and enum types in `ServerMessage`.
pub mod server_message {
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Message {
        #[prost(message, tag="1")]
        RegisterAck(super::RegisterAck),
        #[prost(message, tag="2")]
        WorkAssignment(super::WorkAssignment),
    }
}
/// Server response to RunnerRegister.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegisterAck {
    /// Server-confirmed (or server-assigned) runner ID.
    #[prost(string, tag="1")]
    pub runner_id: ::prost::alloc::string::String,
    #[prost(bool, tag="2")]
    pub accepted: bool,
    #[prost(string, tag="3")]
    pub reason: ::prost::alloc::string::String,
}
/// Work assignment pushed to a runner when a matching release is available.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkAssignment {
    /// Scoped opaque auth token. Use this for GetReleaseFiles, PushLogs,
    /// and CompleteRelease. The token restricts access to only the data
    /// associated with this specific release.
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub release_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub release_intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub artifact_id: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub destination_id: ::prost::alloc::string::String,
    /// Full destination configuration including metadata.
    #[prost(message, optional, tag="6")]
    pub destination: ::core::option::Option<DestinationInfo>,
}
/// Destination configuration sent with the work assignment.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DestinationInfo {
    #[prost(string, tag="1")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub environment: ::prost::alloc::string::String,
    #[prost(map="string, string", tag="3")]
    pub metadata: ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    #[prost(message, optional, tag="4")]
    pub r#type: ::core::option::Option<DestinationCapability>,
    #[prost(string, tag="5")]
    pub organisation: ::prost::alloc::string::String,
}
// ============================================================================
// GetReleaseFiles
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetReleaseFilesRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseFile {
    #[prost(string, tag="1")]
    pub file_name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub file_content: ::prost::alloc::string::String,
}
// ============================================================================
// GetSpecFiles
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetSpecFilesRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
}
// ============================================================================
// GetReleaseAnnotation
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetReleaseAnnotationRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReleaseAnnotationResponse {
    #[prost(string, tag="1")]
    pub slug: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub source_username: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub source_email: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub context_title: ::prost::alloc::string::String,
    #[prost(string, tag="5")]
    pub context_description: ::prost::alloc::string::String,
    #[prost(string, tag="6")]
    pub context_web: ::prost::alloc::string::String,
    #[prost(string, tag="7")]
    pub reference_version: ::prost::alloc::string::String,
    #[prost(string, tag="8")]
    pub reference_commit_sha: ::prost::alloc::string::String,
    #[prost(string, tag="9")]
    pub reference_commit_branch: ::prost::alloc::string::String,
    #[prost(string, tag="10")]
    pub reference_commit_message: ::prost::alloc::string::String,
    #[prost(string, tag="11")]
    pub created_at: ::prost::alloc::string::String,
}
// ============================================================================
// GetProjectInfo
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProjectInfoRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProjectInfoResponse {
    #[prost(string, tag="1")]
    pub organisation: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub project: ::prost::alloc::string::String,
}
// ============================================================================
// PushLogs
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PushLogRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
    /// "stdout" or "stderr"
    #[prost(string, tag="2")]
    pub channel: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub line: ::prost::alloc::string::String,
    #[prost(uint64, tag="4")]
    pub timestamp: u64,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PushLogResponse {
}
// ============================================================================
// CompleteRelease
// ============================================================================

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompleteReleaseRequest {
    #[prost(string, tag="1")]
    pub release_token: ::prost::alloc::string::String,
    #[prost(enumeration="ReleaseOutcome", tag="2")]
    pub outcome: i32,
    /// Error description when outcome is FAILURE.
    #[prost(string, tag="3")]
    pub error_message: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompleteReleaseResponse {
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ReleaseOutcome {
    Unspecified = 0,
    Success = 1,
    Failure = 2,
}
impl ReleaseOutcome {
    /// 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 => "RELEASE_OUTCOME_UNSPECIFIED",
            Self::Success => "RELEASE_OUTCOME_SUCCESS",
            Self::Failure => "RELEASE_OUTCOME_FAILURE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "RELEASE_OUTCOME_UNSPECIFIED" => Some(Self::Unspecified),
            "RELEASE_OUTCOME_SUCCESS" => Some(Self::Success),
            "RELEASE_OUTCOME_FAILURE" => Some(Self::Failure),
            _ => None,
        }
    }
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Trigger {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, tag="3")]
    pub enabled: bool,
    #[prost(string, optional, tag="4")]
    pub branch_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub title_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub author_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub commit_message_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub source_type_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="9")]
    pub target_environments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="10")]
    pub target_destinations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag="11")]
    pub force_release: bool,
    #[prost(string, tag="12")]
    pub created_at: ::prost::alloc::string::String,
    #[prost(string, tag="13")]
    pub updated_at: ::prost::alloc::string::String,
    /// When true, trigger the project's release pipeline instead of
    /// deploying directly to target destinations/environments.
    #[prost(bool, tag="14")]
    pub use_pipeline: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateTriggerRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub branch_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub title_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub author_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub commit_message_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub source_type_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="8")]
    pub target_environments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="9")]
    pub target_destinations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, tag="10")]
    pub force_release: bool,
    #[prost(bool, tag="11")]
    pub use_pipeline: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateTriggerResponse {
    #[prost(message, optional, tag="1")]
    pub trigger: ::core::option::Option<Trigger>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateTriggerRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(bool, optional, tag="3")]
    pub enabled: ::core::option::Option<bool>,
    #[prost(string, optional, tag="4")]
    pub branch_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub title_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="6")]
    pub author_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="7")]
    pub commit_message_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="8")]
    pub source_type_pattern: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="9")]
    pub target_environments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(string, repeated, tag="10")]
    pub target_destinations: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(bool, optional, tag="11")]
    pub force_release: ::core::option::Option<bool>,
    #[prost(bool, optional, tag="12")]
    pub use_pipeline: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateTriggerResponse {
    #[prost(message, optional, tag="1")]
    pub trigger: ::core::option::Option<Trigger>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteTriggerRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteTriggerResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListTriggersRequest {
    #[prost(message, optional, tag="1")]
    pub project: ::core::option::Option<Project>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListTriggersResponse {
    #[prost(message, repeated, tag="1")]
    pub triggers: ::prost::alloc::vec::Vec<Trigger>,
}
// ─── Core types ──────────────────────────────────────────────────────

#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
    /// UUID
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub username: ::prost::alloc::string::String,
    #[prost(message, repeated, tag="3")]
    pub emails: ::prost::alloc::vec::Vec<UserEmail>,
    #[prost(message, repeated, tag="4")]
    pub oauth_connections: ::prost::alloc::vec::Vec<OAuthConnection>,
    #[prost(bool, tag="5")]
    pub mfa_enabled: bool,
    #[prost(message, optional, tag="6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="7")]
    pub updated_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserEmail {
    #[prost(string, tag="1")]
    pub email: ::prost::alloc::string::String,
    #[prost(bool, tag="2")]
    pub verified: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OAuthConnection {
    #[prost(enumeration="OAuthProvider", tag="1")]
    pub provider: i32,
    #[prost(string, tag="2")]
    pub provider_user_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub provider_email: ::prost::alloc::string::String,
    #[prost(message, optional, tag="4")]
    pub linked_at: ::core::option::Option<::prost_types::Timestamp>,
}
// ─── Authentication ──────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RegisterRequest {
    #[prost(string, tag="1")]
    pub username: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub email: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub password: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterResponse {
    #[prost(message, optional, tag="1")]
    pub user: ::core::option::Option<User>,
    #[prost(message, optional, tag="2")]
    pub tokens: ::core::option::Option<AuthTokens>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LoginRequest {
    #[prost(string, tag="3")]
    pub password: ::prost::alloc::string::String,
    /// Login with either username or email
    #[prost(oneof="login_request::Identifier", tags="1, 2")]
    pub identifier: ::core::option::Option<login_request::Identifier>,
}
/// Nested message and enum types in `LoginRequest`.
pub mod login_request {
    /// Login with either username or email
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(string, tag="1")]
        Username(::prost::alloc::string::String),
        #[prost(string, tag="2")]
        Email(::prost::alloc::string::String),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LoginResponse {
    #[prost(message, optional, tag="1")]
    pub user: ::core::option::Option<User>,
    #[prost(message, optional, tag="2")]
    pub tokens: ::core::option::Option<AuthTokens>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RefreshTokenRequest {
    #[prost(string, tag="1")]
    pub refresh_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RefreshTokenResponse {
    #[prost(message, optional, tag="1")]
    pub tokens: ::core::option::Option<AuthTokens>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LogoutRequest {
    #[prost(string, tag="1")]
    pub refresh_token: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LogoutResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AuthTokens {
    #[prost(string, tag="1")]
    pub access_token: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub refresh_token: ::prost::alloc::string::String,
    #[prost(int64, tag="3")]
    pub expires_in_seconds: i64,
}
// ─── Token introspection ─────────────────────────────────────────────

#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TokenInfoRequest {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TokenInfoResponse {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    /// Unix timestamp (seconds)
    #[prost(int64, tag="2")]
    pub expires_at: i64,
}
// ─── User CRUD ───────────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUserRequest {
    #[prost(oneof="get_user_request::Identifier", tags="1, 2, 3")]
    pub identifier: ::core::option::Option<get_user_request::Identifier>,
}
/// Nested message and enum types in `GetUserRequest`.
pub mod get_user_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(string, tag="1")]
        UserId(::prost::alloc::string::String),
        #[prost(string, tag="2")]
        Username(::prost::alloc::string::String),
        #[prost(string, tag="3")]
        Email(::prost::alloc::string::String),
    }
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetUserResponse {
    #[prost(message, optional, tag="1")]
    pub user: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UpdateUserRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub username: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdateUserResponse {
    #[prost(message, optional, tag="1")]
    pub user: ::core::option::Option<User>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteUserRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteUserResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListUsersRequest {
    #[prost(int32, tag="1")]
    pub page_size: i32,
    #[prost(string, tag="2")]
    pub page_token: ::prost::alloc::string::String,
    /// search across username, email
    #[prost(string, optional, tag="3")]
    pub search: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUsersResponse {
    #[prost(message, repeated, tag="1")]
    pub users: ::prost::alloc::vec::Vec<User>,
    #[prost(string, tag="2")]
    pub next_page_token: ::prost::alloc::string::String,
    #[prost(int32, tag="3")]
    pub total_count: i32,
}
// ─── Password management ─────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChangePasswordRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub current_password: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub new_password: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ChangePasswordResponse {
}
// ─── Email management ────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddEmailRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub email: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddEmailResponse {
    #[prost(message, optional, tag="1")]
    pub email: ::core::option::Option<UserEmail>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyEmailRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub email: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyEmailResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveEmailRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub email: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct RemoveEmailResponse {
}
// ─── OAuth / Social login ────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OAuthLoginRequest {
    #[prost(enumeration="OAuthProvider", tag="1")]
    pub provider: i32,
    #[prost(string, tag="2")]
    pub authorization_code: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub redirect_uri: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OAuthLoginResponse {
    #[prost(message, optional, tag="1")]
    pub user: ::core::option::Option<User>,
    #[prost(message, optional, tag="2")]
    pub tokens: ::core::option::Option<AuthTokens>,
    #[prost(bool, tag="3")]
    pub is_new_user: bool,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkOAuthProviderRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(enumeration="OAuthProvider", tag="2")]
    pub provider: i32,
    #[prost(string, tag="3")]
    pub authorization_code: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub redirect_uri: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct LinkOAuthProviderResponse {
    #[prost(message, optional, tag="1")]
    pub connection: ::core::option::Option<OAuthConnection>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnlinkOAuthProviderRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(enumeration="OAuthProvider", tag="2")]
    pub provider: i32,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnlinkOAuthProviderResponse {
}
// ─── Personal access tokens ──────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PersonalAccessToken {
    /// UUID
    #[prost(string, tag="1")]
    pub token_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="3")]
    pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[prost(message, optional, tag="4")]
    pub expires_at: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="5")]
    pub last_used: ::core::option::Option<::prost_types::Timestamp>,
    #[prost(message, optional, tag="6")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePersonalAccessTokenRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub name: ::prost::alloc::string::String,
    #[prost(string, repeated, tag="3")]
    pub scopes: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Duration in seconds; 0 = no expiry
    #[prost(int64, tag="4")]
    pub expires_in_seconds: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreatePersonalAccessTokenResponse {
    #[prost(message, optional, tag="1")]
    pub token: ::core::option::Option<PersonalAccessToken>,
    /// The raw token value, only returned on creation
    #[prost(string, tag="2")]
    pub raw_token: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPersonalAccessTokensRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPersonalAccessTokensResponse {
    #[prost(message, repeated, tag="1")]
    pub tokens: ::prost::alloc::vec::Vec<PersonalAccessToken>,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePersonalAccessTokenRequest {
    #[prost(string, tag="1")]
    pub token_id: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeletePersonalAccessTokenResponse {
}
// ─── Stats ──────────────────────────────────────────────────────────

#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUserStatsRequest {
    #[prost(oneof="get_user_stats_request::Identifier", tags="1, 2")]
    pub identifier: ::core::option::Option<get_user_stats_request::Identifier>,
}
/// Nested message and enum types in `GetUserStatsRequest`.
pub mod get_user_stats_request {
    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
    pub enum Identifier {
        #[prost(string, tag="1")]
        UserId(::prost::alloc::string::String),
        #[prost(string, tag="2")]
        Username(::prost::alloc::string::String),
    }
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetUserStatsResponse {
    #[prost(message, optional, tag="1")]
    pub stats: ::core::option::Option<UserStats>,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UserStats {
    #[prost(int64, tag="1")]
    pub total_releases: i64,
    #[prost(int64, tag="2")]
    pub successful_releases: i64,
    #[prost(int64, tag="3")]
    pub failed_releases: i64,
    #[prost(int64, tag="4")]
    pub in_progress_releases: i64,
    #[prost(int64, tag="5")]
    pub total_annotations: i64,
    #[prost(int64, tag="6")]
    pub total_uploads: i64,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetupMfaRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(enumeration="MfaType", tag="2")]
    pub mfa_type: i32,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SetupMfaResponse {
    /// UUID
    #[prost(string, tag="1")]
    pub mfa_id: ::prost::alloc::string::String,
    /// TOTP provisioning URI (otpauth://...)
    #[prost(string, tag="2")]
    pub provisioning_uri: ::prost::alloc::string::String,
    /// Base32-encoded secret for manual entry
    #[prost(string, tag="3")]
    pub secret: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMfaRequest {
    #[prost(string, tag="1")]
    pub mfa_id: ::prost::alloc::string::String,
    /// The TOTP code to verify setup
    #[prost(string, tag="2")]
    pub code: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct VerifyMfaResponse {
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisableMfaRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    /// Current TOTP code to confirm disable
    #[prost(string, tag="2")]
    pub code: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DisableMfaResponse {
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OAuthProvider {
    OauthProviderUnspecified = 0,
    OauthProviderGithub = 1,
    OauthProviderGoogle = 2,
    OauthProviderGitlab = 3,
    OauthProviderMicrosoft = 4,
}
impl OAuthProvider {
    /// 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::OauthProviderUnspecified => "OAUTH_PROVIDER_UNSPECIFIED",
            Self::OauthProviderGithub => "OAUTH_PROVIDER_GITHUB",
            Self::OauthProviderGoogle => "OAUTH_PROVIDER_GOOGLE",
            Self::OauthProviderGitlab => "OAUTH_PROVIDER_GITLAB",
            Self::OauthProviderMicrosoft => "OAUTH_PROVIDER_MICROSOFT",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "OAUTH_PROVIDER_UNSPECIFIED" => Some(Self::OauthProviderUnspecified),
            "OAUTH_PROVIDER_GITHUB" => Some(Self::OauthProviderGithub),
            "OAUTH_PROVIDER_GOOGLE" => Some(Self::OauthProviderGoogle),
            "OAUTH_PROVIDER_GITLAB" => Some(Self::OauthProviderGitlab),
            "OAUTH_PROVIDER_MICROSOFT" => Some(Self::OauthProviderMicrosoft),
            _ => None,
        }
    }
}
// ─── MFA ─────────────────────────────────────────────────────────────

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MfaType {
    Unspecified = 0,
    Totp = 1,
}
impl MfaType {
    /// 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 => "MFA_TYPE_UNSPECIFIED",
            Self::Totp => "MFA_TYPE_TOTP",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "MFA_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "MFA_TYPE_TOTP" => Some(Self::Totp),
            _ => None,
        }
    }
}
include!("forest.v1.tonic.rs");
// @@protoc_insertion_point(module)