#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSolveJobRequest {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
#[prost(message, optional, tag = "3")]
pub options: ::core::option::Option<SolveOptions>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSolveJobResponse {
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<SolveJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSolveJobRequest {
#[prost(string, tag = "1")]
pub solve_job_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetSolveJobResponse {
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<SolveJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelSolveJobRequest {
#[prost(string, tag = "1")]
pub solve_job_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelSolveJobResponse {
#[prost(message, optional, tag = "1")]
pub job: ::core::option::Option<SolveJob>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolveJob {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(enumeration = "SolveJobState", tag = "3")]
pub state: i32,
#[prost(message, optional, tag = "4")]
pub solved_commit: ::core::option::Option<super::super::versioning::v1::Commit>,
#[prost(message, optional, tag = "5")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "6")]
pub started_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "7")]
pub finished_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "9")]
pub progress: ::core::option::Option<SolveJobProgress>,
#[prost(message, optional, tag = "10")]
pub result: ::core::option::Option<SolvePlanResponse>,
#[prost(string, tag = "11")]
pub error: ::prost::alloc::string::String,
#[prost(message, optional, tag = "12")]
pub resolved_options: ::core::option::Option<ResolvedSolveOptions>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolveJobProgress {
#[prost(string, tag = "1")]
pub current_pass: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub passes_completed: i32,
#[prost(int32, tag = "3")]
pub solutions_found: i32,
#[prost(int32, tag = "6")]
pub placed_activity_count: i32,
#[prost(bool, tag = "7")]
pub tiers_ranked: bool,
#[prost(enumeration = "SolvePhase", tag = "8")]
pub phase: i32,
#[prost(bool, tag = "9")]
pub schedule_settled: bool,
#[prost(int32, tag = "10")]
pub stage: i32,
#[prost(int32, tag = "11")]
pub stage_count: i32,
#[prost(int32, tag = "12")]
pub stage_segment_count: i32,
#[prost(message, optional, tag = "13")]
pub elapsed: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "14")]
pub budget: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolvePlanRequest {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
#[prost(message, optional, tag = "3")]
pub options: ::core::option::Option<SolveOptions>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolveOptions {
#[prost(int32, optional, tag = "1")]
pub max_solutions: ::core::option::Option<i32>,
#[prost(bool, optional, tag = "3")]
pub include_withdrawn_assets: ::core::option::Option<bool>,
#[prost(enumeration = "ObjectiveCoverage", tag = "4")]
pub coverage: i32,
#[prost(bool, optional, tag = "6")]
pub explain_unplaced: ::core::option::Option<bool>,
#[prost(enumeration = "SolveMode", tag = "7")]
pub mode: i32,
#[prost(enumeration = "ProblemDetail", tag = "8")]
pub problem_detail: i32,
#[prost(message, optional, tag = "10")]
pub stability_reference: ::core::option::Option<StabilityReference>,
#[prost(message, optional, tag = "11")]
pub weights: ::core::option::Option<ObjectiveWeights>,
#[prost(message, optional, tag = "13")]
pub schedule_shape: ::core::option::Option<ScheduleShape>,
#[prost(message, optional, tag = "14")]
pub scope: ::core::option::Option<SolveScope>,
#[prost(message, optional, tag = "15")]
pub time_limit: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "16")]
pub time_granularity: ::core::option::Option<super::super::types::Duration>,
#[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "17")]
pub insights: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolveScope {
#[prost(string, repeated, tag = "1")]
pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub widening: ::core::option::Option<SegmentWidening>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SegmentWidening {
#[prost(int32, tag = "1")]
pub initial_segment_count: i32,
#[prost(int32, tag = "2")]
pub step_segment_count: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScheduleShape {
#[prost(int32, tag = "1")]
pub makespan: i32,
#[prost(int32, tag = "2")]
pub even_asset_utilization: i32,
#[prost(int32, tag = "3")]
pub front_loading: i32,
#[prost(int32, tag = "4")]
pub even_activity_distribution: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StabilityReference {
#[prost(string, tag = "1")]
pub label: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub placements: ::prost::alloc::vec::Vec<ReferencePlacement>,
#[prost(bool, tag = "3")]
pub prefer_stability: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReferencePlacement {
#[prost(string, tag = "1")]
pub activity_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub segment_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectiveWeights {
#[prost(message, repeated, tag = "1")]
pub tiers: ::prost::alloc::vec::Vec<TierWeight>,
#[prost(int32, optional, tag = "2")]
pub placement_weight: ::core::option::Option<i32>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TierWeight {
#[prost(enumeration = "super::super::types::Priority", tag = "1")]
pub priority: i32,
#[prost(int32, tag = "2")]
pub weight: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolvePlanResponse {
#[prost(message, optional, tag = "1")]
pub solved_commit: ::core::option::Option<super::super::versioning::v1::Commit>,
#[prost(enumeration = "SolveStatus", tag = "2")]
pub status: i32,
#[prost(message, optional, tag = "3")]
pub problem: ::core::option::Option<SolverProblemSummary>,
#[prost(message, repeated, tag = "4")]
pub findings: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolation>,
#[prost(bool, tag = "5")]
pub findings_truncated: bool,
#[prost(message, repeated, tag = "6")]
pub solutions: ::prost::alloc::vec::Vec<PlanSolution>,
#[prost(message, repeated, tag = "12")]
pub proposed_activities: ::prost::alloc::vec::Vec<ProposedActivity>,
#[prost(message, optional, tag = "7")]
pub infeasibility: ::core::option::Option<InfeasibilityExplanation>,
#[prost(message, optional, tag = "8")]
pub stats: ::core::option::Option<SolveStats>,
#[prost(message, optional, tag = "9")]
pub resolved_options: ::core::option::Option<ResolvedSolveOptions>,
#[prost(message, optional, tag = "10")]
pub insights: ::core::option::Option<PlanInsights>,
#[prost(enumeration = "SolveStopReason", tag = "11")]
pub stop_reason: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedSolveOptions {
#[prost(int32, tag = "1")]
pub max_solutions: i32,
#[prost(bool, tag = "4")]
pub include_withdrawn_assets: bool,
#[prost(enumeration = "ObjectiveCoverage", tag = "5")]
pub coverage: i32,
#[prost(bool, tag = "7")]
pub explain_unplaced: bool,
#[prost(enumeration = "SolveMode", tag = "8")]
pub mode: i32,
#[prost(enumeration = "ProblemDetail", tag = "9")]
pub problem_detail: i32,
#[prost(bool, tag = "11")]
pub stability_reference_supplied: bool,
#[prost(bool, tag = "12")]
pub prefer_stability: bool,
#[prost(message, optional, tag = "13")]
pub weights: ::core::option::Option<ObjectiveWeights>,
#[prost(message, optional, tag = "15")]
pub schedule_shape: ::core::option::Option<ScheduleShape>,
#[prost(message, optional, tag = "16")]
pub scope: ::core::option::Option<ResolvedSolveScope>,
#[prost(message, optional, tag = "17")]
pub time_limit: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "18")]
pub requested_time_limit: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "19")]
pub time_granularity: ::core::option::Option<super::super::types::Duration>,
#[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "20")]
pub insights: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolvedSolveScope {
#[prost(string, repeated, tag = "1")]
pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "2")]
pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag = "3")]
pub solve_activity_count: i32,
#[prost(int32, tag = "4")]
pub held_activity_count: i32,
#[prost(int32, tag = "5")]
pub outside_activity_count: i32,
#[prost(message, optional, tag = "6")]
pub widening: ::core::option::Option<SegmentWidening>,
#[prost(int32, tag = "7")]
pub stage: i32,
#[prost(int32, tag = "8")]
pub stage_count: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverProblemSummary {
#[prost(message, optional, tag = "1")]
pub horizon_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "2")]
pub horizon_end: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(int32, optional, tag = "4")]
pub inferred_utc_offset_minutes: ::core::option::Option<i32>,
#[prost(int32, tag = "5")]
pub segment_count: i32,
#[prost(message, repeated, tag = "6")]
pub activities: ::prost::alloc::vec::Vec<SolverActivityInput>,
#[prost(message, repeated, tag = "7")]
pub resources: ::prost::alloc::vec::Vec<SolverResourceInput>,
#[prost(bool, tag = "8")]
pub resources_truncated: bool,
#[prost(message, repeated, tag = "9")]
pub assets: ::prost::alloc::vec::Vec<SolverAssetInput>,
#[prost(bool, tag = "10")]
pub assets_truncated: bool,
#[prost(message, repeated, tag = "11")]
pub tiers: ::prost::alloc::vec::Vec<SolverTierInput>,
#[prost(message, repeated, tag = "12")]
pub asset_pools: ::prost::alloc::vec::Vec<SolverAssetPool>,
#[prost(bool, tag = "13")]
pub asset_pools_truncated: bool,
#[prost(string, optional, tag = "14")]
pub timezone: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "SolverTimezoneSource", tag = "15")]
pub timezone_source: i32,
#[prost(message, repeated, tag = "16")]
pub constraints: ::prost::alloc::vec::Vec<SolverConstraintInput>,
#[prost(bool, tag = "17")]
pub constraints_truncated: bool,
#[prost(message, repeated, tag = "18")]
pub segments: ::prost::alloc::vec::Vec<SolverSegmentInput>,
#[prost(message, optional, tag = "19")]
pub time_granularity: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverSegmentInput {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(bool, tag = "5")]
pub in_scope: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverConstraintInput {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub applied: bool,
#[prost(string, tag = "7")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverAssetPool {
#[prost(string, tag = "1")]
pub asset_group_id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub eligible_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(int32, tag = "3")]
pub total_eligible_count: i32,
#[prost(message, repeated, tag = "4")]
pub excluded: ::prost::alloc::vec::Vec<SolverExcludedAsset>,
#[prost(int32, tag = "5")]
pub total_excluded_count: i32,
#[prost(string, repeated, tag = "6")]
pub resource_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverActivityInput {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "SolverDurationSource", tag = "4")]
pub duration_source: i32,
#[prost(string, repeated, tag = "5")]
pub allowed_segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(bool, tag = "6")]
pub window_unconstrained: bool,
#[prost(bool, tag = "8")]
pub pinned: bool,
#[prost(string, optional, tag = "9")]
pub excluded_reason: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "10")]
pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "11")]
pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "12")]
pub predecessor_activity_ids: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(enumeration = "SolverActivityScope", tag = "13")]
pub scope: i32,
#[prost(message, optional, tag = "14")]
pub duration: ::core::option::Option<super::super::types::Duration>,
#[prost(bool, tag = "15")]
pub proposed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverResourceInput {
#[prost(string, tag = "1")]
pub objective_id: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub resource_index: i32,
#[prost(string, tag = "3")]
pub resource_name: ::prost::alloc::string::String,
#[prost(int32, tag = "4")]
pub requested_count: i32,
#[prost(string, optional, tag = "5")]
pub asset_group_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(enumeration = "SolverResourceResolution", tag = "6")]
pub resolution: i32,
#[prost(bool, tag = "7")]
pub binding: bool,
#[prost(message, repeated, tag = "8")]
pub eligible: ::prost::alloc::vec::Vec<SolverCandidateAsset>,
#[prost(int32, tag = "9")]
pub total_eligible_count: i32,
#[prost(message, repeated, tag = "10")]
pub excluded: ::prost::alloc::vec::Vec<SolverExcludedAsset>,
#[prost(int32, tag = "11")]
pub total_excluded_count: i32,
#[prost(string, repeated, tag = "12")]
pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "13")]
pub resource_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverCandidateAsset {
#[prost(string, tag = "1")]
pub asset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverExcludedAsset {
#[prost(string, tag = "1")]
pub asset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolverAssetInput {
#[prost(string, tag = "1")]
pub asset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub capacity: i32,
#[prost(string, optional, tag = "6")]
pub participation_status: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "7")]
pub max_activities_per_day: ::core::option::Option<i32>,
#[prost(string, repeated, tag = "8")]
pub allowed_segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "9")]
pub turnaround: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "10")]
pub max_usage_per_day: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SolverTierInput {
#[prost(enumeration = "super::super::types::Priority", tag = "1")]
pub priority: i32,
#[prost(int32, tag = "2")]
pub objective_count: i32,
#[prost(int32, tag = "3")]
pub activity_count: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanSolution {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub summary: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub placements: ::prost::alloc::vec::Vec<SolvedPlacement>,
#[prost(message, repeated, tag = "4")]
pub unplaced: ::prost::alloc::vec::Vec<UnplacedActivity>,
#[prost(message, repeated, tag = "5")]
pub assignments: ::prost::alloc::vec::Vec<SolvedResourceAssignment>,
#[prost(message, optional, tag = "6")]
pub metrics: ::core::option::Option<SolutionMetrics>,
#[prost(message, optional, tag = "7")]
pub diff_from_canonical: ::core::option::Option<SolutionDiff>,
#[prost(message, optional, tag = "8")]
pub characterization: ::core::option::Option<SolutionCharacterization>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolutionCharacterization {
#[prost(string, tag = "1")]
pub headline: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub segments_used: i32,
#[prost(int32, tag = "4")]
pub peak_concurrent_activities: i32,
#[prost(message, optional, tag = "8")]
pub churn: ::core::option::Option<SolutionChurn>,
#[prost(message, optional, tag = "11")]
pub makespan: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "12")]
pub total_start_offset: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "13")]
pub median_asset_usage: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "14")]
pub max_asset_usage: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "15")]
pub busiest_segment_usage: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "16")]
pub last_end_offset: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolutionChurn {
#[prost(string, tag = "1")]
pub reference_label: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub unchanged: i32,
#[prost(int32, tag = "3")]
pub moved: i32,
#[prost(int32, tag = "4")]
pub dropped: i32,
#[prost(int32, tag = "5")]
pub added: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolvedPlacement {
#[prost(string, tag = "1")]
pub activity_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub segment_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(bool, tag = "5")]
pub pinned: bool,
#[prost(message, optional, tag = "6")]
pub flexibility: ::core::option::Option<PlacementFlexibility>,
#[prost(message, repeated, tag = "7")]
pub asset_assignments: ::prost::alloc::vec::Vec<
super::super::plan::v1::AssetAssignment,
>,
#[prost(bool, tag = "8")]
pub proposed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlacementFlexibility {
#[prost(message, optional, tag = "1")]
pub earliest_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "2")]
pub latest_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "5")]
pub blocked_before: ::core::option::Option<BindingConstraint>,
#[prost(message, optional, tag = "6")]
pub blocked_after: ::core::option::Option<BindingConstraint>,
#[prost(message, optional, tag = "7")]
pub slack_before: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "8")]
pub slack_after: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BindingConstraint {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
#[prost(string, optional, tag = "4")]
pub asset_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub activity_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnplacedActivity {
#[prost(string, tag = "1")]
pub activity_id: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub reasons: ::prost::alloc::vec::Vec<UnplacedReason>,
#[prost(message, repeated, tag = "3")]
pub cost_to_place: ::prost::alloc::vec::Vec<TierDelta>,
#[prost(bool, tag = "4")]
pub proposed: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UnplacedReason {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TierDelta {
#[prost(enumeration = "super::super::types::Priority", tag = "1")]
pub priority: i32,
#[prost(int32, tag = "2")]
pub covered_objectives_delta: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolvedResourceAssignment {
#[prost(string, tag = "1")]
pub objective_id: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub resource_index: i32,
#[prost(string, tag = "3")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub resource_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ProposedActivity {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub objective_id: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub planned_duration: ::core::option::Option<super::super::plan::v1::MinuteDuration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolutionMetrics {
#[prost(int32, tag = "2")]
pub placed_activity_count: i32,
#[prost(int32, tag = "3")]
pub unplaced_activity_count: i32,
#[prost(message, repeated, tag = "4")]
pub asset_utilization: ::prost::alloc::vec::Vec<AssetUtilization>,
#[prost(bool, tag = "5")]
pub asset_utilization_truncated: bool,
#[prost(message, optional, tag = "6")]
pub first_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "7")]
pub last_end: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, repeated, tag = "8")]
pub segment_loads: ::prost::alloc::vec::Vec<SegmentLoad>,
#[prost(message, optional, tag = "11")]
pub ranking: ::core::option::Option<TierRanking>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct TierRanking {
#[prost(message, repeated, tag = "1")]
pub tiers: ::prost::alloc::vec::Vec<TierCoverage>,
#[prost(bool, tag = "2")]
pub proven_optimal: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SegmentLoad {
#[prost(string, tag = "1")]
pub segment_id: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub activity_count: i32,
#[prost(int32, tag = "4")]
pub peak_concurrent_activities: i32,
#[prost(message, optional, tag = "5")]
pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TierCoverage {
#[prost(enumeration = "super::super::types::Priority", tag = "1")]
pub priority: i32,
#[prost(int32, tag = "2")]
pub covered_objectives_any: i32,
#[prost(int32, tag = "3")]
pub covered_objectives_all: i32,
#[prost(int32, tag = "4")]
pub total_objectives: i32,
#[prost(int32, tag = "5")]
pub placed_activities: i32,
#[prost(int32, tag = "6")]
pub total_activities: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetUtilization {
#[prost(string, tag = "1")]
pub asset_rid: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub activity_count: i32,
#[prost(message, optional, tag = "4")]
pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolutionDiff {
#[prost(message, repeated, tag = "1")]
pub moved: ::prost::alloc::vec::Vec<ActivityMove>,
#[prost(message, repeated, tag = "2")]
pub reassigned: ::prost::alloc::vec::Vec<ResourceReassignment>,
#[prost(string, tag = "3")]
pub summary: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityMove {
#[prost(string, tag = "1")]
pub activity_id: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub from_segment_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "3")]
pub from_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, optional, tag = "4")]
pub to_segment_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub to_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(enumeration = "MoveKind", tag = "6")]
pub kind: i32,
#[prost(message, optional, tag = "8")]
pub shift: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResourceReassignment {
#[prost(string, tag = "1")]
pub objective_id: ::prost::alloc::string::String,
#[prost(int32, tag = "2")]
pub resource_index: i32,
#[prost(string, tag = "3")]
pub resource_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub removed_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub added_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InfeasibilityExplanation {
#[prost(string, tag = "1")]
pub summary: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub conflicts: ::prost::alloc::vec::Vec<ConflictingConstraint>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConflictingConstraint {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanInsights {
#[prost(string, tag = "1")]
pub skipped_reason: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "2")]
pub critical_assets: ::prost::alloc::vec::Vec<CriticalAsset>,
#[prost(message, repeated, tag = "3")]
pub shadow_prices: ::prost::alloc::vec::Vec<CapacityShadowPrice>,
#[prost(message, repeated, tag = "4")]
pub relaxation_costs: ::prost::alloc::vec::Vec<RelaxationCost>,
#[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "5")]
pub incomplete_analyses: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CriticalAsset {
#[prost(string, tag = "1")]
pub asset_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub title: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub placements_lost: i32,
#[prost(message, repeated, tag = "4")]
pub coverage_lost: ::prost::alloc::vec::Vec<TierDelta>,
#[prost(int32, tag = "6")]
pub activity_count: i32,
#[prost(string, tag = "7")]
pub message: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CapacityShadowPrice {
#[prost(string, tag = "1")]
pub asset_group_id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub example_resource_name: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub current_pool_size: i32,
#[prost(int32, tag = "4")]
pub additional_placements: i32,
#[prost(message, repeated, tag = "5")]
pub coverage_gained: ::prost::alloc::vec::Vec<TierDelta>,
#[prost(string, tag = "6")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RelaxationCost {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub additional_placements: i32,
#[prost(message, repeated, tag = "4")]
pub coverage_gained: ::prost::alloc::vec::Vec<TierDelta>,
#[prost(int32, tag = "5")]
pub elements_affected: i32,
#[prost(string, tag = "6")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolveStats {
#[prost(message, repeated, tag = "2")]
pub passes: ::prost::alloc::vec::Vec<SolvePass>,
#[prost(bool, tag = "3")]
pub passes_truncated: bool,
#[prost(string, tag = "4")]
pub solver_version: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "9")]
pub stages: ::prost::alloc::vec::Vec<WideningStage>,
#[prost(message, optional, tag = "10")]
pub wall_time: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "11")]
pub model_build_time: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "12")]
pub native_init_time: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "13")]
pub pass_wall_time: ::core::option::Option<super::super::types::Duration>,
#[prost(message, optional, tag = "14")]
pub settled_after: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct WideningStage {
#[prost(int32, tag = "1")]
pub segment_count: i32,
#[prost(int32, tag = "2")]
pub placed_activity_count: i32,
#[prost(int32, tag = "3")]
pub unplaced_activity_count: i32,
#[prost(enumeration = "SolveStatus", tag = "4")]
pub status: i32,
#[prost(bool, tag = "6")]
pub converged: bool,
#[prost(message, optional, tag = "7")]
pub wall_time: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SolvePass {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(enumeration = "SolvePassStatus", tag = "2")]
pub status: i32,
#[prost(int64, optional, tag = "3")]
pub objective_value: ::core::option::Option<i64>,
#[prost(int64, optional, tag = "5")]
pub objective_bound: ::core::option::Option<i64>,
#[prost(double, optional, tag = "6")]
pub deterministic_time: ::core::option::Option<f64>,
#[prost(message, optional, tag = "7")]
pub wall_time: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolveJobState {
Unspecified = 0,
Pending = 1,
Running = 2,
Succeeded = 3,
Failed = 4,
Cancelled = 5,
}
impl SolveJobState {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_JOB_STATE_UNSPECIFIED",
Self::Pending => "SOLVE_JOB_STATE_PENDING",
Self::Running => "SOLVE_JOB_STATE_RUNNING",
Self::Succeeded => "SOLVE_JOB_STATE_SUCCEEDED",
Self::Failed => "SOLVE_JOB_STATE_FAILED",
Self::Cancelled => "SOLVE_JOB_STATE_CANCELLED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_JOB_STATE_PENDING" => Some(Self::Pending),
"SOLVE_JOB_STATE_RUNNING" => Some(Self::Running),
"SOLVE_JOB_STATE_SUCCEEDED" => Some(Self::Succeeded),
"SOLVE_JOB_STATE_FAILED" => Some(Self::Failed),
"SOLVE_JOB_STATE_CANCELLED" => Some(Self::Cancelled),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolvePhase {
Unspecified = 0,
Ranking = 1,
TieBreaking = 2,
Recovering = 3,
Alternatives = 4,
Explaining = 5,
Insights = 6,
}
impl SolvePhase {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_PHASE_UNSPECIFIED",
Self::Ranking => "SOLVE_PHASE_RANKING",
Self::TieBreaking => "SOLVE_PHASE_TIE_BREAKING",
Self::Recovering => "SOLVE_PHASE_RECOVERING",
Self::Alternatives => "SOLVE_PHASE_ALTERNATIVES",
Self::Explaining => "SOLVE_PHASE_EXPLAINING",
Self::Insights => "SOLVE_PHASE_INSIGHTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_PHASE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_PHASE_RANKING" => Some(Self::Ranking),
"SOLVE_PHASE_TIE_BREAKING" => Some(Self::TieBreaking),
"SOLVE_PHASE_RECOVERING" => Some(Self::Recovering),
"SOLVE_PHASE_ALTERNATIVES" => Some(Self::Alternatives),
"SOLVE_PHASE_EXPLAINING" => Some(Self::Explaining),
"SOLVE_PHASE_INSIGHTS" => Some(Self::Insights),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolveInsight {
Unspecified = 0,
PlacementFlexibility = 1,
CriticalAssets = 2,
CapacityShadowPrices = 3,
RelaxationCosts = 4,
}
impl SolveInsight {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_INSIGHT_UNSPECIFIED",
Self::PlacementFlexibility => "SOLVE_INSIGHT_PLACEMENT_FLEXIBILITY",
Self::CriticalAssets => "SOLVE_INSIGHT_CRITICAL_ASSETS",
Self::CapacityShadowPrices => "SOLVE_INSIGHT_CAPACITY_SHADOW_PRICES",
Self::RelaxationCosts => "SOLVE_INSIGHT_RELAXATION_COSTS",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_INSIGHT_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_INSIGHT_PLACEMENT_FLEXIBILITY" => Some(Self::PlacementFlexibility),
"SOLVE_INSIGHT_CRITICAL_ASSETS" => Some(Self::CriticalAssets),
"SOLVE_INSIGHT_CAPACITY_SHADOW_PRICES" => Some(Self::CapacityShadowPrices),
"SOLVE_INSIGHT_RELAXATION_COSTS" => Some(Self::RelaxationCosts),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ProblemDetail {
Unspecified = 0,
None = 1,
Counts = 2,
Pools = 3,
Full = 4,
}
impl ProblemDetail {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PROBLEM_DETAIL_UNSPECIFIED",
Self::None => "PROBLEM_DETAIL_NONE",
Self::Counts => "PROBLEM_DETAIL_COUNTS",
Self::Pools => "PROBLEM_DETAIL_POOLS",
Self::Full => "PROBLEM_DETAIL_FULL",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PROBLEM_DETAIL_UNSPECIFIED" => Some(Self::Unspecified),
"PROBLEM_DETAIL_NONE" => Some(Self::None),
"PROBLEM_DETAIL_COUNTS" => Some(Self::Counts),
"PROBLEM_DETAIL_POOLS" => Some(Self::Pools),
"PROBLEM_DETAIL_FULL" => Some(Self::Full),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolveMode {
Unspecified = 0,
Ranked = 1,
FeasibleFast = 2,
}
impl SolveMode {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_MODE_UNSPECIFIED",
Self::Ranked => "SOLVE_MODE_RANKED",
Self::FeasibleFast => "SOLVE_MODE_FEASIBLE_FAST",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_MODE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_MODE_RANKED" => Some(Self::Ranked),
"SOLVE_MODE_FEASIBLE_FAST" => Some(Self::FeasibleFast),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ObjectiveCoverage {
Unspecified = 0,
AnyActivity = 1,
AllActivities = 2,
}
impl ObjectiveCoverage {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "OBJECTIVE_COVERAGE_UNSPECIFIED",
Self::AnyActivity => "OBJECTIVE_COVERAGE_ANY_ACTIVITY",
Self::AllActivities => "OBJECTIVE_COVERAGE_ALL_ACTIVITIES",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"OBJECTIVE_COVERAGE_UNSPECIFIED" => Some(Self::Unspecified),
"OBJECTIVE_COVERAGE_ANY_ACTIVITY" => Some(Self::AnyActivity),
"OBJECTIVE_COVERAGE_ALL_ACTIVITIES" => Some(Self::AllActivities),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolveStopReason {
Unspecified = 0,
Proven = 1,
CeilingReached = 2,
Interrupted = 3,
}
impl SolveStopReason {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_STOP_REASON_UNSPECIFIED",
Self::Proven => "SOLVE_STOP_REASON_PROVEN",
Self::CeilingReached => "SOLVE_STOP_REASON_CEILING_REACHED",
Self::Interrupted => "SOLVE_STOP_REASON_INTERRUPTED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_STOP_REASON_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_STOP_REASON_PROVEN" => Some(Self::Proven),
"SOLVE_STOP_REASON_CEILING_REACHED" => Some(Self::CeilingReached),
"SOLVE_STOP_REASON_INTERRUPTED" => Some(Self::Interrupted),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolveStatus {
Unspecified = 0,
Optimal = 1,
Feasible = 2,
Infeasible = 3,
NoSolutionFound = 4,
ModelInvalid = 5,
Unranked = 6,
}
impl SolveStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_STATUS_UNSPECIFIED",
Self::Optimal => "SOLVE_STATUS_OPTIMAL",
Self::Feasible => "SOLVE_STATUS_FEASIBLE",
Self::Infeasible => "SOLVE_STATUS_INFEASIBLE",
Self::NoSolutionFound => "SOLVE_STATUS_NO_SOLUTION_FOUND",
Self::ModelInvalid => "SOLVE_STATUS_MODEL_INVALID",
Self::Unranked => "SOLVE_STATUS_UNRANKED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_STATUS_OPTIMAL" => Some(Self::Optimal),
"SOLVE_STATUS_FEASIBLE" => Some(Self::Feasible),
"SOLVE_STATUS_INFEASIBLE" => Some(Self::Infeasible),
"SOLVE_STATUS_NO_SOLUTION_FOUND" => Some(Self::NoSolutionFound),
"SOLVE_STATUS_MODEL_INVALID" => Some(Self::ModelInvalid),
"SOLVE_STATUS_UNRANKED" => Some(Self::Unranked),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolvePassStatus {
Unspecified = 0,
Optimal = 1,
Feasible = 2,
Infeasible = 3,
NoSolutionFound = 4,
ModelInvalid = 5,
}
impl SolvePassStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVE_PASS_STATUS_UNSPECIFIED",
Self::Optimal => "SOLVE_PASS_STATUS_OPTIMAL",
Self::Feasible => "SOLVE_PASS_STATUS_FEASIBLE",
Self::Infeasible => "SOLVE_PASS_STATUS_INFEASIBLE",
Self::NoSolutionFound => "SOLVE_PASS_STATUS_NO_SOLUTION_FOUND",
Self::ModelInvalid => "SOLVE_PASS_STATUS_MODEL_INVALID",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVE_PASS_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVE_PASS_STATUS_OPTIMAL" => Some(Self::Optimal),
"SOLVE_PASS_STATUS_FEASIBLE" => Some(Self::Feasible),
"SOLVE_PASS_STATUS_INFEASIBLE" => Some(Self::Infeasible),
"SOLVE_PASS_STATUS_NO_SOLUTION_FOUND" => Some(Self::NoSolutionFound),
"SOLVE_PASS_STATUS_MODEL_INVALID" => Some(Self::ModelInvalid),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolverTimezoneSource {
Unspecified = 0,
Declared = 1,
Inferred = 2,
}
impl SolverTimezoneSource {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVER_TIMEZONE_SOURCE_UNSPECIFIED",
Self::Declared => "SOLVER_TIMEZONE_SOURCE_DECLARED",
Self::Inferred => "SOLVER_TIMEZONE_SOURCE_INFERRED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVER_TIMEZONE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVER_TIMEZONE_SOURCE_DECLARED" => Some(Self::Declared),
"SOLVER_TIMEZONE_SOURCE_INFERRED" => Some(Self::Inferred),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolverActivityScope {
Unspecified = 0,
InScope = 1,
Held = 2,
OutsideScope = 3,
}
impl SolverActivityScope {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVER_ACTIVITY_SCOPE_UNSPECIFIED",
Self::InScope => "SOLVER_ACTIVITY_SCOPE_IN_SCOPE",
Self::Held => "SOLVER_ACTIVITY_SCOPE_HELD",
Self::OutsideScope => "SOLVER_ACTIVITY_SCOPE_OUTSIDE_SCOPE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVER_ACTIVITY_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVER_ACTIVITY_SCOPE_IN_SCOPE" => Some(Self::InScope),
"SOLVER_ACTIVITY_SCOPE_HELD" => Some(Self::Held),
"SOLVER_ACTIVITY_SCOPE_OUTSIDE_SCOPE" => Some(Self::OutsideScope),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolverDurationSource {
Unspecified = 0,
DescriptionBlock = 1,
Defaulted = 2,
ExistingWindow = 3,
PlannedDuration = 4,
}
impl SolverDurationSource {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVER_DURATION_SOURCE_UNSPECIFIED",
Self::DescriptionBlock => "SOLVER_DURATION_SOURCE_DESCRIPTION_BLOCK",
Self::Defaulted => "SOLVER_DURATION_SOURCE_DEFAULTED",
Self::ExistingWindow => "SOLVER_DURATION_SOURCE_EXISTING_WINDOW",
Self::PlannedDuration => "SOLVER_DURATION_SOURCE_PLANNED_DURATION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVER_DURATION_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVER_DURATION_SOURCE_DESCRIPTION_BLOCK" => Some(Self::DescriptionBlock),
"SOLVER_DURATION_SOURCE_DEFAULTED" => Some(Self::Defaulted),
"SOLVER_DURATION_SOURCE_EXISTING_WINDOW" => Some(Self::ExistingWindow),
"SOLVER_DURATION_SOURCE_PLANNED_DURATION" => Some(Self::PlannedDuration),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum SolverResourceResolution {
Unspecified = 0,
Resolved = 1,
NoCandidatePool = 2,
EmptyPool = 3,
AllCandidatesExcluded = 4,
InsufficientCandidates = 5,
}
impl SolverResourceResolution {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "SOLVER_RESOURCE_RESOLUTION_UNSPECIFIED",
Self::Resolved => "SOLVER_RESOURCE_RESOLUTION_RESOLVED",
Self::NoCandidatePool => "SOLVER_RESOURCE_RESOLUTION_NO_CANDIDATE_POOL",
Self::EmptyPool => "SOLVER_RESOURCE_RESOLUTION_EMPTY_POOL",
Self::AllCandidatesExcluded => {
"SOLVER_RESOURCE_RESOLUTION_ALL_CANDIDATES_EXCLUDED"
}
Self::InsufficientCandidates => {
"SOLVER_RESOURCE_RESOLUTION_INSUFFICIENT_CANDIDATES"
}
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"SOLVER_RESOURCE_RESOLUTION_UNSPECIFIED" => Some(Self::Unspecified),
"SOLVER_RESOURCE_RESOLUTION_RESOLVED" => Some(Self::Resolved),
"SOLVER_RESOURCE_RESOLUTION_NO_CANDIDATE_POOL" => Some(Self::NoCandidatePool),
"SOLVER_RESOURCE_RESOLUTION_EMPTY_POOL" => Some(Self::EmptyPool),
"SOLVER_RESOURCE_RESOLUTION_ALL_CANDIDATES_EXCLUDED" => {
Some(Self::AllCandidatesExcluded)
}
"SOLVER_RESOURCE_RESOLUTION_INSUFFICIENT_CANDIDATES" => {
Some(Self::InsufficientCandidates)
}
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum MoveKind {
Unspecified = 0,
TimeShift = 1,
Rescheduled = 2,
Dropped = 3,
Added = 4,
}
impl MoveKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "MOVE_KIND_UNSPECIFIED",
Self::TimeShift => "MOVE_KIND_TIME_SHIFT",
Self::Rescheduled => "MOVE_KIND_RESCHEDULED",
Self::Dropped => "MOVE_KIND_DROPPED",
Self::Added => "MOVE_KIND_ADDED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"MOVE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"MOVE_KIND_TIME_SHIFT" => Some(Self::TimeShift),
"MOVE_KIND_RESCHEDULED" => Some(Self::Rescheduled),
"MOVE_KIND_DROPPED" => Some(Self::Dropped),
"MOVE_KIND_ADDED" => Some(Self::Added),
_ => None,
}
}
}
pub mod plan_solver_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct PlanSolverServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl PlanSolverServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> PlanSolverServiceClient<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,
) -> PlanSolverServiceClient<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,
{
PlanSolverServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn solve_plan(
&mut self,
request: impl tonic::IntoRequest<super::SolvePlanRequest>,
) -> std::result::Result<
tonic::Response<super::SolvePlanResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plansolver.v1.PlanSolverService/SolvePlan",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.plansolver.v1.PlanSolverService",
"SolvePlan",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_solve_job(
&mut self,
request: impl tonic::IntoRequest<super::CreateSolveJobRequest>,
) -> std::result::Result<
tonic::Response<super::CreateSolveJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plansolver.v1.PlanSolverService/CreateSolveJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.plansolver.v1.PlanSolverService",
"CreateSolveJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_solve_job(
&mut self,
request: impl tonic::IntoRequest<super::GetSolveJobRequest>,
) -> std::result::Result<
tonic::Response<super::GetSolveJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plansolver.v1.PlanSolverService/GetSolveJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.plansolver.v1.PlanSolverService",
"GetSolveJob",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn cancel_solve_job(
&mut self,
request: impl tonic::IntoRequest<super::CancelSolveJobRequest>,
) -> std::result::Result<
tonic::Response<super::CancelSolveJobResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plansolver.v1.PlanSolverService/CancelSolveJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.plansolver.v1.PlanSolverService",
"CancelSolveJob",
),
);
self.inner.unary(req, path, codec).await
}
}
}