// This file is @generated by prost-build.
/// An executor connected to the Ora server.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Executor {
    /// The ID of the executor.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The name of the executor.
    #[prost(string, optional, tag = "2")]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
    /// The time the executor was last seen.
    #[prost(message, optional, tag = "3")]
    pub last_seen_at: ::core::option::Option<::prost_types::Timestamp>,
    /// Job queues of the executor.
    #[prost(message, repeated, tag = "4")]
    pub queues: ::prost::alloc::vec::Vec<ExecutorJobQueue>,
}
impl ::prost::Name for Executor {
    const NAME: &'static str = "Executor";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.Executor".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.Executor".into()
    }
}
/// The job queue of an executor for a specific job type.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ExecutorJobQueue {
    /// The job type the queue is for.
    #[prost(message, optional, tag = "1")]
    pub job_type: ::core::option::Option<super::super::jobs::v1::JobType>,
    /// The maximum amount of concurrent executions allowed for this job type.
    #[prost(uint64, tag = "2")]
    pub max_concurrent_executions: u64,
    /// The amount of active executions in the queue.
    #[prost(uint64, tag = "3")]
    pub active_executions: u64,
}
impl ::prost::Name for ExecutorJobQueue {
    const NAME: &'static str = "ExecutorJobQueue";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ExecutorJobQueue".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ExecutorJobQueue".into()
    }
}
/// A job execution.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Execution {
    /// The unique ID of the execution.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The ID of the executor handling the execution.
    #[prost(string, optional, tag = "2")]
    pub executor_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The status of the execution.
    #[prost(enumeration = "ExecutionStatus", tag = "3")]
    pub status: i32,
    /// The timestamp when the execution was created.
    #[prost(message, optional, tag = "4")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The timestamp when the execution started.
    #[prost(message, optional, tag = "5")]
    pub started_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The timestamp when the execution successfully completed.
    #[prost(message, optional, tag = "6")]
    pub succeeded_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The timestamp when the execution failed.
    #[prost(message, optional, tag = "7")]
    pub failed_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The timestamp when the execution was cancelled.
    #[prost(message, optional, tag = "8")]
    pub cancelled_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The output or result of the execution.
    #[prost(string, optional, tag = "9")]
    pub output_json: ::core::option::Option<::prost::alloc::string::String>,
    /// The error message if the execution failed or was cancelled.
    #[prost(string, optional, tag = "10")]
    pub failure_reason: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for Execution {
    const NAME: &'static str = "Execution";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.Execution".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.Execution".into()
    }
}
/// Status of a job execution.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ExecutionStatus {
    /// Unknown status.
    Unspecified = 0,
    /// The execution is pending.
    Pending = 1,
    /// The execution is in progress.
    InProgress = 2,
    /// The execution has completed successfully.
    Succeeded = 3,
    /// The execution has failed.
    Failed = 4,
    /// The execution was cancelled.
    Cancelled = 5,
}
impl ExecutionStatus {
    /// 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 => "EXECUTION_STATUS_UNSPECIFIED",
            Self::Pending => "EXECUTION_STATUS_PENDING",
            Self::InProgress => "EXECUTION_STATUS_IN_PROGRESS",
            Self::Succeeded => "EXECUTION_STATUS_SUCCEEDED",
            Self::Failed => "EXECUTION_STATUS_FAILED",
            Self::Cancelled => "EXECUTION_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 {
            "EXECUTION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "EXECUTION_STATUS_PENDING" => Some(Self::Pending),
            "EXECUTION_STATUS_IN_PROGRESS" => Some(Self::InProgress),
            "EXECUTION_STATUS_SUCCEEDED" => Some(Self::Succeeded),
            "EXECUTION_STATUS_FAILED" => Some(Self::Failed),
            "EXECUTION_STATUS_CANCELLED" => Some(Self::Cancelled),
            _ => None,
        }
    }
}
/// Details of a job.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Job {
    /// The unique ID of the job.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The job definition.
    #[prost(message, optional, tag = "2")]
    pub job: ::core::option::Option<super::super::jobs::v1::Job>,
    /// A schedule associated with the job (if any).
    #[prost(string, optional, tag = "3")]
    pub schedule_id: ::core::option::Option<::prost::alloc::string::String>,
    /// The timestamp when the job was created.
    #[prost(message, optional, tag = "4")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The executions of the job.
    #[prost(message, repeated, tag = "5")]
    pub executions: ::prost::alloc::vec::Vec<Execution>,
}
impl ::prost::Name for Job {
    const NAME: &'static str = "Job";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.Job".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.Job".into()
    }
}
/// Filters for listing jobs.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct JobFilters {
    /// Filter by job IDs.
    #[prost(string, repeated, tag = "1")]
    pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by job type IDs.
    #[prost(string, repeated, tag = "2")]
    pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by schedule IDs.
    #[prost(string, repeated, tag = "3")]
    pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by executor IDs.
    #[prost(string, repeated, tag = "4")]
    pub executor_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by execution IDs.
    #[prost(string, repeated, tag = "5")]
    pub execution_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by the status of the last execution.
    #[prost(enumeration = "ExecutionStatus", repeated, tag = "6")]
    pub execution_statuses: ::prost::alloc::vec::Vec<i32>,
    /// Filter by target execution times.
    ///
    /// The range can be open-ended in either direction.
    #[prost(message, optional, tag = "7")]
    pub target_execution_time: ::core::option::Option<super::super::common::v1::TimeRange>,
    /// Filter by creation time.
    ///
    /// The range can be open-ended in either direction.
    #[prost(message, optional, tag = "8")]
    pub created_at: ::core::option::Option<super::super::common::v1::TimeRange>,
    /// Filter by labels.
    #[prost(message, repeated, tag = "9")]
    pub labels: ::prost::alloc::vec::Vec<super::super::common::v1::LabelFilter>,
}
impl ::prost::Name for JobFilters {
    const NAME: &'static str = "JobFilters";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.JobFilters".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.JobFilters".into()
    }
}
/// Ordering options for listing jobs.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobOrderBy {
    /// Default ordering (by creation time descending).
    Unspecified = 0,
    /// Order by creation time ascending.
    CreatedAtAsc = 1,
    /// Order by creation time descending.
    CreatedAtDesc = 2,
    /// Order by target execution time ascending.
    TargetExecutionTimeAsc = 3,
    /// Order by target execution time descending.
    TargetExecutionTimeDesc = 4,
}
impl JobOrderBy {
    /// 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 => "JOB_ORDER_BY_UNSPECIFIED",
            Self::CreatedAtAsc => "JOB_ORDER_BY_CREATED_AT_ASC",
            Self::CreatedAtDesc => "JOB_ORDER_BY_CREATED_AT_DESC",
            Self::TargetExecutionTimeAsc => "JOB_ORDER_BY_TARGET_EXECUTION_TIME_ASC",
            Self::TargetExecutionTimeDesc => "JOB_ORDER_BY_TARGET_EXECUTION_TIME_DESC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "JOB_ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
            "JOB_ORDER_BY_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
            "JOB_ORDER_BY_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
            "JOB_ORDER_BY_TARGET_EXECUTION_TIME_ASC" => Some(Self::TargetExecutionTimeAsc),
            "JOB_ORDER_BY_TARGET_EXECUTION_TIME_DESC" => Some(Self::TargetExecutionTimeDesc),
            _ => None,
        }
    }
}
/// Pagination options for listing requests.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PaginationOptions {
    /// The maximum number of items to return.
    #[prost(uint32, tag = "1")]
    pub page_size: u32,
    /// The token for the next page of results
    /// from a previous request (if any).
    ///
    /// Any filters and ordering applied
    /// in the previous request must be identical
    /// to those in the current request.
    /// In case of mismatch the behavior is unspecified.
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for PaginationOptions {
    const NAME: &'static str = "PaginationOptions";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.PaginationOptions".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.PaginationOptions".into()
    }
}
/// Schedule details.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Schedule {
    /// The unique ID of the schedule.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The schedule definition.
    #[prost(message, optional, tag = "2")]
    pub schedule: ::core::option::Option<super::super::schedules::v1::Schedule>,
    /// The timestamp when the schedule was created.
    #[prost(message, optional, tag = "3")]
    pub created_at: ::core::option::Option<::prost_types::Timestamp>,
    /// The status of the schedule.
    #[prost(enumeration = "ScheduleStatus", tag = "4")]
    pub status: i32,
    /// The timestamp when the schedule was stopped (if any).
    #[prost(message, optional, tag = "5")]
    pub stopped_at: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for Schedule {
    const NAME: &'static str = "Schedule";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.Schedule".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.Schedule".into()
    }
}
/// Filters for listing schedules.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScheduleFilters {
    /// Filter by schedule IDs.
    #[prost(string, repeated, tag = "1")]
    pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by job type IDs.
    #[prost(string, repeated, tag = "2")]
    pub job_type_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Filter by status.
    #[prost(enumeration = "ScheduleStatus", repeated, tag = "3")]
    pub statuses: ::prost::alloc::vec::Vec<i32>,
    /// Filter by creation time.
    ///
    /// The range can be open-ended in either direction.
    #[prost(message, optional, tag = "4")]
    pub created_at: ::core::option::Option<super::super::common::v1::TimeRange>,
    /// Filter by labels.
    #[prost(message, repeated, tag = "5")]
    pub labels: ::prost::alloc::vec::Vec<super::super::common::v1::LabelFilter>,
}
impl ::prost::Name for ScheduleFilters {
    const NAME: &'static str = "ScheduleFilters";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ScheduleFilters".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ScheduleFilters".into()
    }
}
/// The status of a schedule.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ScheduleStatus {
    /// Unknown status.
    Unspecified = 0,
    /// The schedule is active.
    Active = 1,
    /// The schedule was stopped.
    ///
    /// Once a schedule is stopped, it cannot be re-activated.
    Stopped = 2,
}
impl ScheduleStatus {
    /// 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 => "SCHEDULE_STATUS_UNSPECIFIED",
            Self::Active => "SCHEDULE_STATUS_ACTIVE",
            Self::Stopped => "SCHEDULE_STATUS_STOPPED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SCHEDULE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "SCHEDULE_STATUS_ACTIVE" => Some(Self::Active),
            "SCHEDULE_STATUS_STOPPED" => Some(Self::Stopped),
            _ => None,
        }
    }
}
/// Ordering options for listing schedules.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ScheduleOrderBy {
    /// Unspecified ordering.
    Unspecified = 0,
    /// Order by creation time.
    CreatedAtAsc = 1,
    /// Order by creation time, descending.
    CreatedAtDesc = 2,
}
impl ScheduleOrderBy {
    /// 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 => "SCHEDULE_ORDER_BY_UNSPECIFIED",
            Self::CreatedAtAsc => "SCHEDULE_ORDER_BY_CREATED_AT_ASC",
            Self::CreatedAtDesc => "SCHEDULE_ORDER_BY_CREATED_AT_DESC",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SCHEDULE_ORDER_BY_UNSPECIFIED" => Some(Self::Unspecified),
            "SCHEDULE_ORDER_BY_CREATED_AT_ASC" => Some(Self::CreatedAtAsc),
            "SCHEDULE_ORDER_BY_CREATED_AT_DESC" => Some(Self::CreatedAtDesc),
            _ => None,
        }
    }
}
/// Request for `ListJobTypes`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListJobTypesRequest {}
impl ::prost::Name for ListJobTypesRequest {
    const NAME: &'static str = "ListJobTypesRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListJobTypesRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListJobTypesRequest".into()
    }
}
/// Response for `ListJobTypes`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobTypesResponse {
    /// The list of job types.
    #[prost(message, repeated, tag = "1")]
    pub job_types: ::prost::alloc::vec::Vec<super::super::jobs::v1::JobType>,
}
impl ::prost::Name for ListJobTypesResponse {
    const NAME: &'static str = "ListJobTypesResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListJobTypesResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListJobTypesResponse".into()
    }
}
/// Request for `AddJobs`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddJobsRequest {
    /// The jobs to be added.
    #[prost(message, repeated, tag = "1")]
    pub jobs: ::prost::alloc::vec::Vec<super::super::jobs::v1::Job>,
    /// Optional filters to prevent adding jobs.
    ///
    /// If any jobs exist that match the filters, no new jobs will be added.
    #[prost(message, optional, tag = "2")]
    pub if_not_exists: ::core::option::Option<JobFilters>,
}
impl ::prost::Name for AddJobsRequest {
    const NAME: &'static str = "AddJobsRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.AddJobsRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.AddJobsRequest".into()
    }
}
/// Response for `AddJobs`.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddJobsResponse {
    /// The IDs of the added jobs.
    #[prost(string, repeated, tag = "1")]
    pub job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The IDs of existing jobs that
    /// matched the `if_not_exists` filters (if any).
    #[prost(string, repeated, tag = "2")]
    pub existing_job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for AddJobsResponse {
    const NAME: &'static str = "AddJobsResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.AddJobsResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.AddJobsResponse".into()
    }
}
/// Request for `ListJobs`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsRequest {
    /// The filters to apply when listing jobs.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<JobFilters>,
    /// The ordering options.
    #[prost(enumeration = "JobOrderBy", tag = "2")]
    pub order_by: i32,
    /// Pagination options.
    #[prost(message, optional, tag = "3")]
    pub pagination: ::core::option::Option<PaginationOptions>,
}
impl ::prost::Name for ListJobsRequest {
    const NAME: &'static str = "ListJobsRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListJobsRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListJobsRequest".into()
    }
}
/// Response for `ListJobs`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListJobsResponse {
    /// The list of jobs.
    #[prost(message, repeated, tag = "1")]
    pub jobs: ::prost::alloc::vec::Vec<Job>,
    /// The token for the next page of results (if any).
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for ListJobsResponse {
    const NAME: &'static str = "ListJobsResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListJobsResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListJobsResponse".into()
    }
}
/// Request for `CountJobs`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountJobsRequest {
    /// The filters to apply when counting jobs.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<JobFilters>,
}
impl ::prost::Name for CountJobsRequest {
    const NAME: &'static str = "CountJobsRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CountJobsRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CountJobsRequest".into()
    }
}
/// Response for `CountJobs`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CountJobsResponse {
    /// The number of jobs.
    #[prost(uint64, tag = "1")]
    pub count: u64,
}
impl ::prost::Name for CountJobsResponse {
    const NAME: &'static str = "CountJobsResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CountJobsResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CountJobsResponse".into()
    }
}
/// Request for `CancelJobs`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelJobsRequest {
    /// The filters to apply when cancelling jobs.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<JobFilters>,
}
impl ::prost::Name for CancelJobsRequest {
    const NAME: &'static str = "CancelJobsRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CancelJobsRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CancelJobsRequest".into()
    }
}
/// Response for `CancelJobs`.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CancelJobsResponse {
    /// The list of cancelled job IDs.
    #[prost(string, repeated, tag = "1")]
    pub cancelled_job_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for CancelJobsResponse {
    const NAME: &'static str = "CancelJobsResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CancelJobsResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CancelJobsResponse".into()
    }
}
/// Request for `AddSchedules`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddSchedulesRequest {
    /// The schedules to be added.
    #[prost(message, repeated, tag = "1")]
    pub schedules: ::prost::alloc::vec::Vec<super::super::schedules::v1::Schedule>,
    /// Optional filters to prevent adding schedules.
    ///
    /// If any schedules exist that match the filters, no new schedules will be added.
    #[prost(message, optional, tag = "2")]
    pub if_not_exists: ::core::option::Option<ScheduleFilters>,
    /// Whether to inherit labels from the schedules when creating jobs.
    ///
    /// By default, labels are inherited.
    #[prost(bool, optional, tag = "3")]
    pub inherit_labels: ::core::option::Option<bool>,
}
impl ::prost::Name for AddSchedulesRequest {
    const NAME: &'static str = "AddSchedulesRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.AddSchedulesRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.AddSchedulesRequest".into()
    }
}
/// Response for `AddSchedules`.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AddSchedulesResponse {
    /// The IDs of the added schedules.
    #[prost(string, repeated, tag = "1")]
    pub schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The IDs of existing schedules that
    /// matched the `if_not_exists` filters (if any).
    #[prost(string, repeated, tag = "2")]
    pub existing_schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for AddSchedulesResponse {
    const NAME: &'static str = "AddSchedulesResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.AddSchedulesResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.AddSchedulesResponse".into()
    }
}
/// Request for `ListSchedules`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesRequest {
    /// The filters to apply when listing schedules.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<ScheduleFilters>,
    /// The ordering options.
    #[prost(enumeration = "ScheduleOrderBy", tag = "2")]
    pub order_by: i32,
    /// Pagination options.
    #[prost(message, optional, tag = "3")]
    pub pagination: ::core::option::Option<PaginationOptions>,
}
impl ::prost::Name for ListSchedulesRequest {
    const NAME: &'static str = "ListSchedulesRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListSchedulesRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListSchedulesRequest".into()
    }
}
/// Response for `ListSchedules`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSchedulesResponse {
    /// The list of schedules.
    #[prost(message, repeated, tag = "1")]
    pub schedules: ::prost::alloc::vec::Vec<Schedule>,
    /// The token for the next page of results (if any).
    #[prost(string, optional, tag = "2")]
    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
impl ::prost::Name for ListSchedulesResponse {
    const NAME: &'static str = "ListSchedulesResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListSchedulesResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListSchedulesResponse".into()
    }
}
/// Request for `CountSchedules`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CountSchedulesRequest {
    /// The filters to apply when counting schedules.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<ScheduleFilters>,
}
impl ::prost::Name for CountSchedulesRequest {
    const NAME: &'static str = "CountSchedulesRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CountSchedulesRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CountSchedulesRequest".into()
    }
}
/// Response for `CountSchedules`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CountSchedulesResponse {
    /// The number of schedules.
    #[prost(uint64, tag = "1")]
    pub count: u64,
}
impl ::prost::Name for CountSchedulesResponse {
    const NAME: &'static str = "CountSchedulesResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.CountSchedulesResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.CountSchedulesResponse".into()
    }
}
/// Request for `StopSchedules`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopSchedulesRequest {
    /// The filters to find schedules to stop.
    #[prost(message, optional, tag = "1")]
    pub filters: ::core::option::Option<ScheduleFilters>,
    /// Whether to also cancel active jobs of the stopped schedules.
    #[prost(bool, tag = "2")]
    pub cancel_active_jobs: bool,
}
impl ::prost::Name for StopSchedulesRequest {
    const NAME: &'static str = "StopSchedulesRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.StopSchedulesRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.StopSchedulesRequest".into()
    }
}
/// Response for `StopSchedules`.
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct StopSchedulesResponse {
    /// The list of cancelled schedule IDs.
    #[prost(string, repeated, tag = "1")]
    pub cancelled_schedule_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
impl ::prost::Name for StopSchedulesResponse {
    const NAME: &'static str = "StopSchedulesResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.StopSchedulesResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.StopSchedulesResponse".into()
    }
}
/// Request for `ListExecutors`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListExecutorsRequest {}
impl ::prost::Name for ListExecutorsRequest {
    const NAME: &'static str = "ListExecutorsRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListExecutorsRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListExecutorsRequest".into()
    }
}
/// Response for `ListExecutors`.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListExecutorsResponse {
    /// The list of executors.
    #[prost(message, repeated, tag = "1")]
    pub executors: ::prost::alloc::vec::Vec<Executor>,
}
impl ::prost::Name for ListExecutorsResponse {
    const NAME: &'static str = "ListExecutorsResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.ListExecutorsResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.ListExecutorsResponse".into()
    }
}
/// Request for `DeleteHistoricalData`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteHistoricalDataRequest {
    /// The cutoff time. Data older than this time will be deleted.
    #[prost(message, optional, tag = "1")]
    pub before: ::core::option::Option<::prost_types::Timestamp>,
}
impl ::prost::Name for DeleteHistoricalDataRequest {
    const NAME: &'static str = "DeleteHistoricalDataRequest";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.DeleteHistoricalDataRequest".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.DeleteHistoricalDataRequest".into()
    }
}
/// Response for `DeleteHistoricalData`.
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct DeleteHistoricalDataResponse {}
impl ::prost::Name for DeleteHistoricalDataResponse {
    const NAME: &'static str = "DeleteHistoricalDataResponse";
    const PACKAGE: &'static str = "ora.admin.v1";
    fn full_name() -> ::prost::alloc::string::String {
        "ora.admin.v1.DeleteHistoricalDataResponse".into()
    }
    fn type_url() -> ::prost::alloc::string::String {
        "/ora.admin.v1.DeleteHistoricalDataResponse".into()
    }
}
/// Generated client implementations.
pub mod admin_service_client {
    #![allow(
        unused_variables,
        dead_code,
        missing_docs,
        clippy::wildcard_imports,
        clippy::let_unit_value
    )]
    use tonic::codegen::http::Uri;
    use tonic::codegen::*;
    /// Administrative service for managing the Ora server.
    #[derive(Debug, Clone)]
    pub struct AdminServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> AdminServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::Body>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> AdminServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                    http::Request<tonic::body::Body>,
                    Response = http::Response<
                        <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
                    >,
                >,
            <T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error:
                Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            AdminServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// List all supported job types.
        pub async fn list_job_types(
            &mut self,
            request: impl tonic::IntoRequest<super::ListJobTypesRequest>,
        ) -> std::result::Result<tonic::Response<super::ListJobTypesResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/ListJobTypes");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "ListJobTypes"));
            self.inner.unary(req, path, codec).await
        }
        /// Add jobs to be executed.
        pub async fn add_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::AddJobsRequest>,
        ) -> std::result::Result<tonic::Response<super::AddJobsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/AddJobs");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "AddJobs"));
            self.inner.unary(req, path, codec).await
        }
        /// List jobs.
        pub async fn list_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListJobsRequest>,
        ) -> std::result::Result<tonic::Response<super::ListJobsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/ListJobs");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "ListJobs"));
            self.inner.unary(req, path, codec).await
        }
        /// Count jobs.
        pub async fn count_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::CountJobsRequest>,
        ) -> std::result::Result<tonic::Response<super::CountJobsResponse>, tonic::Status> {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/CountJobs");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "CountJobs"));
            self.inner.unary(req, path, codec).await
        }
        /// Cancel jobs.
        pub async fn cancel_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelJobsRequest>,
        ) -> std::result::Result<tonic::Response<super::CancelJobsResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/CancelJobs");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "CancelJobs"));
            self.inner.unary(req, path, codec).await
        }
        /// Add schedules.
        pub async fn add_schedules(
            &mut self,
            request: impl tonic::IntoRequest<super::AddSchedulesRequest>,
        ) -> std::result::Result<tonic::Response<super::AddSchedulesResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/AddSchedules");
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(GrpcMethod::new("ora.admin.v1.AdminService", "AddSchedules"));
            self.inner.unary(req, path, codec).await
        }
        /// List schedules.
        pub async fn list_schedules(
            &mut self,
            request: impl tonic::IntoRequest<super::ListSchedulesRequest>,
        ) -> std::result::Result<tonic::Response<super::ListSchedulesResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/ListSchedules");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new(
                "ora.admin.v1.AdminService",
                "ListSchedules",
            ));
            self.inner.unary(req, path, codec).await
        }
        /// Count schedules.
        pub async fn count_schedules(
            &mut self,
            request: impl tonic::IntoRequest<super::CountSchedulesRequest>,
        ) -> std::result::Result<tonic::Response<super::CountSchedulesResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/CountSchedules");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new(
                "ora.admin.v1.AdminService",
                "CountSchedules",
            ));
            self.inner.unary(req, path, codec).await
        }
        /// Stop schedules.
        pub async fn stop_schedules(
            &mut self,
            request: impl tonic::IntoRequest<super::StopSchedulesRequest>,
        ) -> std::result::Result<tonic::Response<super::StopSchedulesResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/StopSchedules");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new(
                "ora.admin.v1.AdminService",
                "StopSchedules",
            ));
            self.inner.unary(req, path, codec).await
        }
        /// List executors.
        pub async fn list_executors(
            &mut self,
            request: impl tonic::IntoRequest<super::ListExecutorsRequest>,
        ) -> std::result::Result<tonic::Response<super::ListExecutorsResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path =
                http::uri::PathAndQuery::from_static("/ora.admin.v1.AdminService/ListExecutors");
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new(
                "ora.admin.v1.AdminService",
                "ListExecutors",
            ));
            self.inner.unary(req, path, codec).await
        }
        /// Delete historical data.
        ///
        /// * Inactive jobs.
        /// * Inactive schedules.
        /// * Job types that are no longer used.
        pub async fn delete_historical_data(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteHistoricalDataRequest>,
        ) -> std::result::Result<tonic::Response<super::DeleteHistoricalDataResponse>, tonic::Status>
        {
            self.inner.ready().await.map_err(|e| {
                tonic::Status::unknown(format!("Service was not ready: {}", e.into()))
            })?;
            let codec = tonic_prost::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/ora.admin.v1.AdminService/DeleteHistoricalData",
            );
            let mut req = request.into_request();
            req.extensions_mut().insert(GrpcMethod::new(
                "ora.admin.v1.AdminService",
                "DeleteHistoricalData",
            ));
            self.inner.unary(req, path, codec).await
        }
    }
}
