1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct CreateSolveJobRequest {
4 #[prost(string, tag = "1")]
5 pub plan_rid: ::prost::alloc::string::String,
6 #[prost(message, optional, tag = "2")]
7 pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
8 #[prost(message, optional, tag = "3")]
9 pub options: ::core::option::Option<SolveOptions>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
12pub struct CreateSolveJobResponse {
13 #[prost(message, optional, tag = "1")]
14 pub job: ::core::option::Option<SolveJob>,
15}
16#[derive(Clone, PartialEq, ::prost::Message)]
17pub struct GetSolveJobRequest {
18 #[prost(string, tag = "1")]
19 pub solve_job_rid: ::prost::alloc::string::String,
20}
21#[derive(Clone, PartialEq, ::prost::Message)]
22pub struct GetSolveJobResponse {
23 #[prost(message, optional, tag = "1")]
24 pub job: ::core::option::Option<SolveJob>,
25}
26#[derive(Clone, PartialEq, ::prost::Message)]
27pub struct CancelSolveJobRequest {
28 #[prost(string, tag = "1")]
29 pub solve_job_rid: ::prost::alloc::string::String,
30}
31#[derive(Clone, PartialEq, ::prost::Message)]
32pub struct CancelSolveJobResponse {
33 #[prost(message, optional, tag = "1")]
34 pub job: ::core::option::Option<SolveJob>,
35}
36#[derive(Clone, PartialEq, ::prost::Message)]
37pub struct SolveJob {
38 #[prost(string, tag = "1")]
39 pub rid: ::prost::alloc::string::String,
40 #[prost(string, tag = "2")]
41 pub plan_rid: ::prost::alloc::string::String,
42 #[prost(enumeration = "SolveJobState", tag = "3")]
43 pub state: i32,
44 #[prost(message, optional, tag = "4")]
45 pub solved_commit: ::core::option::Option<super::super::versioning::v1::Commit>,
46 #[prost(message, optional, tag = "5")]
47 pub created_at: ::core::option::Option<
48 super::super::super::google::protobuf::Timestamp,
49 >,
50 #[prost(message, optional, tag = "6")]
51 pub started_at: ::core::option::Option<
52 super::super::super::google::protobuf::Timestamp,
53 >,
54 #[prost(message, optional, tag = "7")]
55 pub finished_at: ::core::option::Option<
56 super::super::super::google::protobuf::Timestamp,
57 >,
58 #[prost(message, optional, tag = "9")]
59 pub progress: ::core::option::Option<SolveJobProgress>,
60 #[prost(message, optional, tag = "10")]
61 pub result: ::core::option::Option<SolvePlanResponse>,
62 #[prost(string, tag = "11")]
63 pub error: ::prost::alloc::string::String,
64 #[prost(message, optional, tag = "12")]
65 pub resolved_options: ::core::option::Option<ResolvedSolveOptions>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct SolveJobProgress {
69 #[prost(string, tag = "1")]
70 pub current_pass: ::prost::alloc::string::String,
71 #[prost(int32, tag = "2")]
72 pub passes_completed: i32,
73 #[prost(int32, tag = "3")]
74 pub solutions_found: i32,
75 #[prost(int32, tag = "6")]
76 pub placed_activity_count: i32,
77 #[prost(bool, tag = "7")]
78 pub tiers_ranked: bool,
79 #[prost(enumeration = "SolvePhase", tag = "8")]
80 pub phase: i32,
81 #[prost(bool, tag = "9")]
82 pub schedule_settled: bool,
83 #[prost(int32, tag = "10")]
84 pub stage: i32,
85 #[prost(int32, tag = "11")]
86 pub stage_count: i32,
87 #[prost(int32, tag = "12")]
88 pub stage_segment_count: i32,
89 #[prost(message, optional, tag = "13")]
90 pub elapsed: ::core::option::Option<super::super::types::Duration>,
91 #[prost(message, optional, tag = "14")]
92 pub budget: ::core::option::Option<super::super::types::Duration>,
93}
94#[derive(Clone, PartialEq, ::prost::Message)]
95pub struct SolvePlanRequest {
96 #[prost(string, tag = "1")]
97 pub plan_rid: ::prost::alloc::string::String,
98 #[prost(message, optional, tag = "2")]
99 pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
100 #[prost(message, optional, tag = "3")]
101 pub options: ::core::option::Option<SolveOptions>,
102}
103#[derive(Clone, PartialEq, ::prost::Message)]
104pub struct SolveOptions {
105 #[prost(int32, optional, tag = "1")]
106 pub max_solutions: ::core::option::Option<i32>,
107 #[prost(bool, optional, tag = "3")]
108 pub include_withdrawn_assets: ::core::option::Option<bool>,
109 #[prost(enumeration = "ObjectiveCoverage", tag = "4")]
110 pub coverage: i32,
111 #[prost(bool, optional, tag = "6")]
112 pub explain_unplaced: ::core::option::Option<bool>,
113 #[prost(enumeration = "SolveMode", tag = "7")]
114 pub mode: i32,
115 #[prost(enumeration = "ProblemDetail", tag = "8")]
116 pub problem_detail: i32,
117 #[prost(message, optional, tag = "10")]
118 pub stability_reference: ::core::option::Option<StabilityReference>,
119 #[prost(message, optional, tag = "11")]
120 pub weights: ::core::option::Option<ObjectiveWeights>,
121 #[prost(message, optional, tag = "13")]
122 pub schedule_shape: ::core::option::Option<ScheduleShape>,
123 #[prost(message, optional, tag = "14")]
124 pub scope: ::core::option::Option<SolveScope>,
125 #[prost(message, optional, tag = "15")]
126 pub time_limit: ::core::option::Option<super::super::types::Duration>,
127 #[prost(message, optional, tag = "16")]
128 pub time_granularity: ::core::option::Option<super::super::types::Duration>,
129 #[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "17")]
130 pub insights: ::prost::alloc::vec::Vec<i32>,
131}
132#[derive(Clone, PartialEq, ::prost::Message)]
133pub struct SolveScope {
134 #[prost(string, repeated, tag = "1")]
135 pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
136 #[prost(string, repeated, tag = "2")]
137 pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
138 #[prost(string, repeated, tag = "3")]
139 pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
140 #[prost(message, optional, tag = "4")]
141 pub widening: ::core::option::Option<SegmentWidening>,
142}
143#[derive(Clone, Copy, PartialEq, ::prost::Message)]
144pub struct SegmentWidening {
145 #[prost(int32, tag = "1")]
146 pub initial_segment_count: i32,
147 #[prost(int32, tag = "2")]
148 pub step_segment_count: i32,
149}
150#[derive(Clone, Copy, PartialEq, ::prost::Message)]
151pub struct ScheduleShape {
152 #[prost(int32, tag = "1")]
153 pub makespan: i32,
154 #[prost(int32, tag = "2")]
155 pub even_asset_utilization: i32,
156 #[prost(int32, tag = "3")]
157 pub front_loading: i32,
158 #[prost(int32, tag = "4")]
159 pub even_activity_distribution: i32,
160}
161#[derive(Clone, PartialEq, ::prost::Message)]
162pub struct StabilityReference {
163 #[prost(string, tag = "1")]
164 pub label: ::prost::alloc::string::String,
165 #[prost(message, repeated, tag = "2")]
166 pub placements: ::prost::alloc::vec::Vec<ReferencePlacement>,
167 #[prost(bool, tag = "3")]
168 pub prefer_stability: bool,
169}
170#[derive(Clone, PartialEq, ::prost::Message)]
171pub struct ReferencePlacement {
172 #[prost(string, tag = "1")]
173 pub activity_id: ::prost::alloc::string::String,
174 #[prost(string, tag = "2")]
175 pub segment_id: ::prost::alloc::string::String,
176 #[prost(message, optional, tag = "3")]
177 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct ObjectiveWeights {
181 #[prost(message, repeated, tag = "1")]
182 pub tiers: ::prost::alloc::vec::Vec<TierWeight>,
183 #[prost(int32, optional, tag = "2")]
184 pub placement_weight: ::core::option::Option<i32>,
185}
186#[derive(Clone, Copy, PartialEq, ::prost::Message)]
187pub struct TierWeight {
188 #[prost(enumeration = "super::super::types::Priority", tag = "1")]
189 pub priority: i32,
190 #[prost(int32, tag = "2")]
191 pub weight: i32,
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct SolvePlanResponse {
195 #[prost(message, optional, tag = "1")]
196 pub solved_commit: ::core::option::Option<super::super::versioning::v1::Commit>,
197 #[prost(enumeration = "SolveStatus", tag = "2")]
198 pub status: i32,
199 #[prost(message, optional, tag = "3")]
200 pub problem: ::core::option::Option<SolverProblemSummary>,
201 #[prost(message, repeated, tag = "4")]
202 pub findings: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolation>,
203 #[prost(bool, tag = "5")]
204 pub findings_truncated: bool,
205 #[prost(message, repeated, tag = "6")]
206 pub solutions: ::prost::alloc::vec::Vec<PlanSolution>,
207 #[prost(message, optional, tag = "7")]
208 pub infeasibility: ::core::option::Option<InfeasibilityExplanation>,
209 #[prost(message, optional, tag = "8")]
210 pub stats: ::core::option::Option<SolveStats>,
211 #[prost(message, optional, tag = "9")]
212 pub resolved_options: ::core::option::Option<ResolvedSolveOptions>,
213 #[prost(message, optional, tag = "10")]
214 pub insights: ::core::option::Option<PlanInsights>,
215 #[prost(enumeration = "SolveStopReason", tag = "11")]
216 pub stop_reason: i32,
217}
218#[derive(Clone, PartialEq, ::prost::Message)]
219pub struct ResolvedSolveOptions {
220 #[prost(int32, tag = "1")]
221 pub max_solutions: i32,
222 #[prost(bool, tag = "4")]
223 pub include_withdrawn_assets: bool,
224 #[prost(enumeration = "ObjectiveCoverage", tag = "5")]
225 pub coverage: i32,
226 #[prost(bool, tag = "7")]
227 pub explain_unplaced: bool,
228 #[prost(enumeration = "SolveMode", tag = "8")]
229 pub mode: i32,
230 #[prost(enumeration = "ProblemDetail", tag = "9")]
231 pub problem_detail: i32,
232 #[prost(bool, tag = "11")]
233 pub stability_reference_supplied: bool,
234 #[prost(bool, tag = "12")]
235 pub prefer_stability: bool,
236 #[prost(message, optional, tag = "13")]
237 pub weights: ::core::option::Option<ObjectiveWeights>,
238 #[prost(message, optional, tag = "15")]
239 pub schedule_shape: ::core::option::Option<ScheduleShape>,
240 #[prost(message, optional, tag = "16")]
241 pub scope: ::core::option::Option<ResolvedSolveScope>,
242 #[prost(message, optional, tag = "17")]
243 pub time_limit: ::core::option::Option<super::super::types::Duration>,
244 #[prost(message, optional, tag = "18")]
245 pub requested_time_limit: ::core::option::Option<super::super::types::Duration>,
246 #[prost(message, optional, tag = "19")]
247 pub time_granularity: ::core::option::Option<super::super::types::Duration>,
248 #[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "20")]
249 pub insights: ::prost::alloc::vec::Vec<i32>,
250}
251#[derive(Clone, PartialEq, ::prost::Message)]
252pub struct ResolvedSolveScope {
253 #[prost(string, repeated, tag = "1")]
254 pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
255 #[prost(string, repeated, tag = "2")]
256 pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
257 #[prost(int32, tag = "3")]
258 pub solve_activity_count: i32,
259 #[prost(int32, tag = "4")]
260 pub held_activity_count: i32,
261 #[prost(int32, tag = "5")]
262 pub outside_activity_count: i32,
263 #[prost(message, optional, tag = "6")]
264 pub widening: ::core::option::Option<SegmentWidening>,
265 #[prost(int32, tag = "7")]
266 pub stage: i32,
267 #[prost(int32, tag = "8")]
268 pub stage_count: i32,
269}
270#[derive(Clone, PartialEq, ::prost::Message)]
271pub struct SolverProblemSummary {
272 #[prost(message, optional, tag = "1")]
273 pub horizon_start: ::core::option::Option<
274 super::super::super::google::protobuf::Timestamp,
275 >,
276 #[prost(message, optional, tag = "2")]
277 pub horizon_end: ::core::option::Option<
278 super::super::super::google::protobuf::Timestamp,
279 >,
280 #[prost(int32, optional, tag = "4")]
281 pub inferred_utc_offset_minutes: ::core::option::Option<i32>,
282 #[prost(int32, tag = "5")]
283 pub segment_count: i32,
284 #[prost(message, repeated, tag = "6")]
285 pub activities: ::prost::alloc::vec::Vec<SolverActivityInput>,
286 #[prost(message, repeated, tag = "7")]
287 pub resources: ::prost::alloc::vec::Vec<SolverResourceInput>,
288 #[prost(bool, tag = "8")]
289 pub resources_truncated: bool,
290 #[prost(message, repeated, tag = "9")]
291 pub assets: ::prost::alloc::vec::Vec<SolverAssetInput>,
292 #[prost(bool, tag = "10")]
293 pub assets_truncated: bool,
294 #[prost(message, repeated, tag = "11")]
295 pub tiers: ::prost::alloc::vec::Vec<SolverTierInput>,
296 #[prost(message, repeated, tag = "12")]
297 pub asset_pools: ::prost::alloc::vec::Vec<SolverAssetPool>,
298 #[prost(bool, tag = "13")]
299 pub asset_pools_truncated: bool,
300 #[prost(string, optional, tag = "14")]
301 pub timezone: ::core::option::Option<::prost::alloc::string::String>,
302 #[prost(enumeration = "SolverTimezoneSource", tag = "15")]
303 pub timezone_source: i32,
304 #[prost(message, repeated, tag = "16")]
305 pub constraints: ::prost::alloc::vec::Vec<SolverConstraintInput>,
306 #[prost(bool, tag = "17")]
307 pub constraints_truncated: bool,
308 #[prost(message, repeated, tag = "18")]
309 pub segments: ::prost::alloc::vec::Vec<SolverSegmentInput>,
310 #[prost(message, optional, tag = "19")]
311 pub time_granularity: ::core::option::Option<super::super::types::Duration>,
312}
313#[derive(Clone, PartialEq, ::prost::Message)]
314pub struct SolverSegmentInput {
315 #[prost(string, tag = "1")]
316 pub id: ::prost::alloc::string::String,
317 #[prost(string, tag = "2")]
318 pub name: ::prost::alloc::string::String,
319 #[prost(message, optional, tag = "3")]
320 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
321 #[prost(message, optional, tag = "4")]
322 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
323 #[prost(bool, tag = "5")]
324 pub in_scope: bool,
325}
326#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct SolverConstraintInput {
328 #[prost(string, tag = "1")]
329 pub id: ::prost::alloc::string::String,
330 #[prost(string, tag = "2")]
331 pub name: ::prost::alloc::string::String,
332 #[prost(string, tag = "3")]
333 pub kind: ::prost::alloc::string::String,
334 #[prost(string, repeated, tag = "4")]
335 pub activity_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
336 #[prost(string, repeated, tag = "5")]
337 pub asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
338 #[prost(bool, tag = "6")]
339 pub applied: bool,
340 #[prost(string, tag = "7")]
341 pub reason: ::prost::alloc::string::String,
342}
343#[derive(Clone, PartialEq, ::prost::Message)]
344pub struct SolverAssetPool {
345 #[prost(string, tag = "1")]
346 pub asset_group_id: ::prost::alloc::string::String,
347 #[prost(string, repeated, tag = "2")]
348 pub eligible_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
349 #[prost(int32, tag = "3")]
350 pub total_eligible_count: i32,
351 #[prost(message, repeated, tag = "4")]
352 pub excluded: ::prost::alloc::vec::Vec<SolverExcludedAsset>,
353 #[prost(int32, tag = "5")]
354 pub total_excluded_count: i32,
355 #[prost(string, repeated, tag = "6")]
356 pub resource_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
357}
358#[derive(Clone, PartialEq, ::prost::Message)]
359pub struct SolverActivityInput {
360 #[prost(string, tag = "1")]
361 pub id: ::prost::alloc::string::String,
362 #[prost(string, tag = "2")]
363 pub name: ::prost::alloc::string::String,
364 #[prost(enumeration = "SolverDurationSource", tag = "4")]
365 pub duration_source: i32,
366 #[prost(string, repeated, tag = "5")]
367 pub allowed_segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
368 #[prost(bool, tag = "6")]
369 pub window_unconstrained: bool,
370 #[prost(bool, tag = "8")]
371 pub pinned: bool,
372 #[prost(string, optional, tag = "9")]
373 pub excluded_reason: ::core::option::Option<::prost::alloc::string::String>,
374 #[prost(string, repeated, tag = "10")]
375 pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
376 #[prost(string, repeated, tag = "11")]
377 pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
378 #[prost(string, repeated, tag = "12")]
379 pub predecessor_activity_ids: ::prost::alloc::vec::Vec<
380 ::prost::alloc::string::String,
381 >,
382 #[prost(enumeration = "SolverActivityScope", tag = "13")]
383 pub scope: i32,
384 #[prost(message, optional, tag = "14")]
385 pub duration: ::core::option::Option<super::super::types::Duration>,
386}
387#[derive(Clone, PartialEq, ::prost::Message)]
388pub struct SolverResourceInput {
389 #[prost(string, tag = "1")]
390 pub objective_id: ::prost::alloc::string::String,
391 #[prost(int32, tag = "2")]
392 pub resource_index: i32,
393 #[prost(string, tag = "3")]
394 pub resource_name: ::prost::alloc::string::String,
395 #[prost(int32, tag = "4")]
396 pub requested_count: i32,
397 #[prost(string, optional, tag = "5")]
398 pub asset_group_id: ::core::option::Option<::prost::alloc::string::String>,
399 #[prost(enumeration = "SolverResourceResolution", tag = "6")]
400 pub resolution: i32,
401 #[prost(bool, tag = "7")]
402 pub binding: bool,
403 #[prost(message, repeated, tag = "8")]
404 pub eligible: ::prost::alloc::vec::Vec<SolverCandidateAsset>,
405 #[prost(int32, tag = "9")]
406 pub total_eligible_count: i32,
407 #[prost(message, repeated, tag = "10")]
408 pub excluded: ::prost::alloc::vec::Vec<SolverExcludedAsset>,
409 #[prost(int32, tag = "11")]
410 pub total_excluded_count: i32,
411 #[prost(string, repeated, tag = "12")]
412 pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
413 #[prost(string, optional, tag = "13")]
414 pub resource_id: ::core::option::Option<::prost::alloc::string::String>,
415}
416#[derive(Clone, PartialEq, ::prost::Message)]
417pub struct SolverCandidateAsset {
418 #[prost(string, tag = "1")]
419 pub asset_rid: ::prost::alloc::string::String,
420 #[prost(string, tag = "2")]
421 pub title: ::prost::alloc::string::String,
422}
423#[derive(Clone, PartialEq, ::prost::Message)]
424pub struct SolverExcludedAsset {
425 #[prost(string, tag = "1")]
426 pub asset_rid: ::prost::alloc::string::String,
427 #[prost(string, tag = "2")]
428 pub title: ::prost::alloc::string::String,
429 #[prost(string, tag = "3")]
430 pub reason: ::prost::alloc::string::String,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct SolverAssetInput {
434 #[prost(string, tag = "1")]
435 pub asset_rid: ::prost::alloc::string::String,
436 #[prost(string, tag = "2")]
437 pub title: ::prost::alloc::string::String,
438 #[prost(int32, tag = "3")]
439 pub capacity: i32,
440 #[prost(string, optional, tag = "6")]
441 pub participation_status: ::core::option::Option<::prost::alloc::string::String>,
442 #[prost(int32, optional, tag = "7")]
443 pub max_activities_per_day: ::core::option::Option<i32>,
444 #[prost(string, repeated, tag = "8")]
445 pub allowed_segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
446 #[prost(message, optional, tag = "9")]
447 pub turnaround: ::core::option::Option<super::super::types::Duration>,
448 #[prost(message, optional, tag = "10")]
449 pub max_usage_per_day: ::core::option::Option<super::super::types::Duration>,
450}
451#[derive(Clone, Copy, PartialEq, ::prost::Message)]
452pub struct SolverTierInput {
453 #[prost(enumeration = "super::super::types::Priority", tag = "1")]
454 pub priority: i32,
455 #[prost(int32, tag = "2")]
456 pub objective_count: i32,
457 #[prost(int32, tag = "3")]
458 pub activity_count: i32,
459}
460#[derive(Clone, PartialEq, ::prost::Message)]
461pub struct PlanSolution {
462 #[prost(string, tag = "1")]
463 pub id: ::prost::alloc::string::String,
464 #[prost(string, tag = "2")]
465 pub summary: ::prost::alloc::string::String,
466 #[prost(message, repeated, tag = "3")]
467 pub placements: ::prost::alloc::vec::Vec<SolvedPlacement>,
468 #[prost(message, repeated, tag = "4")]
469 pub unplaced: ::prost::alloc::vec::Vec<UnplacedActivity>,
470 #[prost(message, repeated, tag = "5")]
471 pub assignments: ::prost::alloc::vec::Vec<SolvedResourceAssignment>,
472 #[prost(message, optional, tag = "6")]
473 pub metrics: ::core::option::Option<SolutionMetrics>,
474 #[prost(message, optional, tag = "7")]
475 pub diff_from_canonical: ::core::option::Option<SolutionDiff>,
476 #[prost(message, optional, tag = "8")]
477 pub characterization: ::core::option::Option<SolutionCharacterization>,
478}
479#[derive(Clone, PartialEq, ::prost::Message)]
480pub struct SolutionCharacterization {
481 #[prost(string, tag = "1")]
482 pub headline: ::prost::alloc::string::String,
483 #[prost(int32, tag = "3")]
484 pub segments_used: i32,
485 #[prost(int32, tag = "4")]
486 pub peak_concurrent_activities: i32,
487 #[prost(message, optional, tag = "8")]
488 pub churn: ::core::option::Option<SolutionChurn>,
489 #[prost(message, optional, tag = "11")]
490 pub makespan: ::core::option::Option<super::super::types::Duration>,
491 #[prost(message, optional, tag = "12")]
492 pub total_start_offset: ::core::option::Option<super::super::types::Duration>,
493 #[prost(message, optional, tag = "13")]
494 pub median_asset_usage: ::core::option::Option<super::super::types::Duration>,
495 #[prost(message, optional, tag = "14")]
496 pub max_asset_usage: ::core::option::Option<super::super::types::Duration>,
497 #[prost(message, optional, tag = "15")]
498 pub busiest_segment_usage: ::core::option::Option<super::super::types::Duration>,
499 #[prost(message, optional, tag = "16")]
500 pub last_end_offset: ::core::option::Option<super::super::types::Duration>,
501}
502#[derive(Clone, PartialEq, ::prost::Message)]
503pub struct SolutionChurn {
504 #[prost(string, tag = "1")]
505 pub reference_label: ::prost::alloc::string::String,
506 #[prost(int32, tag = "2")]
507 pub unchanged: i32,
508 #[prost(int32, tag = "3")]
509 pub moved: i32,
510 #[prost(int32, tag = "4")]
511 pub dropped: i32,
512 #[prost(int32, tag = "5")]
513 pub added: i32,
514}
515#[derive(Clone, PartialEq, ::prost::Message)]
516pub struct SolvedPlacement {
517 #[prost(string, tag = "1")]
518 pub activity_id: ::prost::alloc::string::String,
519 #[prost(string, tag = "2")]
520 pub segment_id: ::prost::alloc::string::String,
521 #[prost(message, optional, tag = "3")]
522 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
523 #[prost(message, optional, tag = "4")]
524 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
525 #[prost(bool, tag = "5")]
526 pub pinned: bool,
527 #[prost(message, optional, tag = "6")]
528 pub flexibility: ::core::option::Option<PlacementFlexibility>,
529 #[prost(message, repeated, tag = "7")]
530 pub asset_assignments: ::prost::alloc::vec::Vec<
531 super::super::plan::v1::AssetAssignment,
532 >,
533}
534#[derive(Clone, PartialEq, ::prost::Message)]
535pub struct PlacementFlexibility {
536 #[prost(message, optional, tag = "1")]
537 pub earliest_start: ::core::option::Option<
538 super::super::super::google::protobuf::Timestamp,
539 >,
540 #[prost(message, optional, tag = "2")]
541 pub latest_start: ::core::option::Option<
542 super::super::super::google::protobuf::Timestamp,
543 >,
544 #[prost(message, optional, tag = "5")]
545 pub blocked_before: ::core::option::Option<BindingConstraint>,
546 #[prost(message, optional, tag = "6")]
547 pub blocked_after: ::core::option::Option<BindingConstraint>,
548 #[prost(message, optional, tag = "7")]
549 pub slack_before: ::core::option::Option<super::super::types::Duration>,
550 #[prost(message, optional, tag = "8")]
551 pub slack_after: ::core::option::Option<super::super::types::Duration>,
552}
553#[derive(Clone, PartialEq, ::prost::Message)]
554pub struct BindingConstraint {
555 #[prost(string, tag = "1")]
556 pub code: ::prost::alloc::string::String,
557 #[prost(string, tag = "2")]
558 pub message: ::prost::alloc::string::String,
559 #[prost(message, repeated, tag = "3")]
560 pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
561 #[prost(string, optional, tag = "4")]
562 pub asset_rid: ::core::option::Option<::prost::alloc::string::String>,
563 #[prost(string, optional, tag = "5")]
564 pub activity_id: ::core::option::Option<::prost::alloc::string::String>,
565}
566#[derive(Clone, PartialEq, ::prost::Message)]
567pub struct UnplacedActivity {
568 #[prost(string, tag = "1")]
569 pub activity_id: ::prost::alloc::string::String,
570 #[prost(message, repeated, tag = "2")]
571 pub reasons: ::prost::alloc::vec::Vec<UnplacedReason>,
572 #[prost(message, repeated, tag = "3")]
573 pub cost_to_place: ::prost::alloc::vec::Vec<TierDelta>,
574}
575#[derive(Clone, PartialEq, ::prost::Message)]
576pub struct UnplacedReason {
577 #[prost(string, tag = "1")]
578 pub code: ::prost::alloc::string::String,
579 #[prost(string, tag = "2")]
580 pub message: ::prost::alloc::string::String,
581 #[prost(message, repeated, tag = "3")]
582 pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
583}
584#[derive(Clone, Copy, PartialEq, ::prost::Message)]
585pub struct TierDelta {
586 #[prost(enumeration = "super::super::types::Priority", tag = "1")]
587 pub priority: i32,
588 #[prost(int32, tag = "2")]
589 pub covered_objectives_delta: i32,
590}
591#[derive(Clone, PartialEq, ::prost::Message)]
592pub struct SolvedResourceAssignment {
593 #[prost(string, tag = "1")]
594 pub objective_id: ::prost::alloc::string::String,
595 #[prost(int32, tag = "2")]
596 pub resource_index: i32,
597 #[prost(string, tag = "3")]
598 pub resource_name: ::prost::alloc::string::String,
599 #[prost(string, repeated, tag = "4")]
600 pub asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
601 #[prost(string, optional, tag = "5")]
602 pub resource_id: ::core::option::Option<::prost::alloc::string::String>,
603}
604#[derive(Clone, PartialEq, ::prost::Message)]
605pub struct SolutionMetrics {
606 #[prost(int32, tag = "2")]
607 pub placed_activity_count: i32,
608 #[prost(int32, tag = "3")]
609 pub unplaced_activity_count: i32,
610 #[prost(message, repeated, tag = "4")]
611 pub asset_utilization: ::prost::alloc::vec::Vec<AssetUtilization>,
612 #[prost(bool, tag = "5")]
613 pub asset_utilization_truncated: bool,
614 #[prost(message, optional, tag = "6")]
615 pub first_start: ::core::option::Option<
616 super::super::super::google::protobuf::Timestamp,
617 >,
618 #[prost(message, optional, tag = "7")]
619 pub last_end: ::core::option::Option<
620 super::super::super::google::protobuf::Timestamp,
621 >,
622 #[prost(message, repeated, tag = "8")]
623 pub segment_loads: ::prost::alloc::vec::Vec<SegmentLoad>,
624 #[prost(message, optional, tag = "11")]
625 pub ranking: ::core::option::Option<TierRanking>,
626}
627#[derive(Clone, PartialEq, ::prost::Message)]
628pub struct TierRanking {
629 #[prost(message, repeated, tag = "1")]
630 pub tiers: ::prost::alloc::vec::Vec<TierCoverage>,
631 #[prost(bool, tag = "2")]
632 pub proven_optimal: bool,
633}
634#[derive(Clone, PartialEq, ::prost::Message)]
635pub struct SegmentLoad {
636 #[prost(string, tag = "1")]
637 pub segment_id: ::prost::alloc::string::String,
638 #[prost(int32, tag = "2")]
639 pub activity_count: i32,
640 #[prost(int32, tag = "4")]
641 pub peak_concurrent_activities: i32,
642 #[prost(message, optional, tag = "5")]
643 pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
644}
645#[derive(Clone, Copy, PartialEq, ::prost::Message)]
646pub struct TierCoverage {
647 #[prost(enumeration = "super::super::types::Priority", tag = "1")]
648 pub priority: i32,
649 #[prost(int32, tag = "2")]
650 pub covered_objectives_any: i32,
651 #[prost(int32, tag = "3")]
652 pub covered_objectives_all: i32,
653 #[prost(int32, tag = "4")]
654 pub total_objectives: i32,
655 #[prost(int32, tag = "5")]
656 pub placed_activities: i32,
657 #[prost(int32, tag = "6")]
658 pub total_activities: i32,
659}
660#[derive(Clone, PartialEq, ::prost::Message)]
661pub struct AssetUtilization {
662 #[prost(string, tag = "1")]
663 pub asset_rid: ::prost::alloc::string::String,
664 #[prost(int32, tag = "3")]
665 pub activity_count: i32,
666 #[prost(message, optional, tag = "4")]
667 pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
668}
669#[derive(Clone, PartialEq, ::prost::Message)]
670pub struct SolutionDiff {
671 #[prost(message, repeated, tag = "1")]
672 pub moved: ::prost::alloc::vec::Vec<ActivityMove>,
673 #[prost(message, repeated, tag = "2")]
674 pub reassigned: ::prost::alloc::vec::Vec<ResourceReassignment>,
675 #[prost(string, tag = "3")]
676 pub summary: ::prost::alloc::string::String,
677}
678#[derive(Clone, PartialEq, ::prost::Message)]
679pub struct ActivityMove {
680 #[prost(string, tag = "1")]
681 pub activity_id: ::prost::alloc::string::String,
682 #[prost(string, optional, tag = "2")]
683 pub from_segment_id: ::core::option::Option<::prost::alloc::string::String>,
684 #[prost(message, optional, tag = "3")]
685 pub from_start: ::core::option::Option<
686 super::super::super::google::protobuf::Timestamp,
687 >,
688 #[prost(string, optional, tag = "4")]
689 pub to_segment_id: ::core::option::Option<::prost::alloc::string::String>,
690 #[prost(message, optional, tag = "5")]
691 pub to_start: ::core::option::Option<
692 super::super::super::google::protobuf::Timestamp,
693 >,
694 #[prost(enumeration = "MoveKind", tag = "6")]
695 pub kind: i32,
696 #[prost(message, optional, tag = "8")]
697 pub shift: ::core::option::Option<super::super::types::Duration>,
698}
699#[derive(Clone, PartialEq, ::prost::Message)]
700pub struct ResourceReassignment {
701 #[prost(string, tag = "1")]
702 pub objective_id: ::prost::alloc::string::String,
703 #[prost(int32, tag = "2")]
704 pub resource_index: i32,
705 #[prost(string, tag = "3")]
706 pub resource_name: ::prost::alloc::string::String,
707 #[prost(string, repeated, tag = "4")]
708 pub removed_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
709 #[prost(string, repeated, tag = "5")]
710 pub added_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
711}
712#[derive(Clone, PartialEq, ::prost::Message)]
713pub struct InfeasibilityExplanation {
714 #[prost(string, tag = "1")]
715 pub summary: ::prost::alloc::string::String,
716 #[prost(message, repeated, tag = "2")]
717 pub conflicts: ::prost::alloc::vec::Vec<ConflictingConstraint>,
718}
719#[derive(Clone, PartialEq, ::prost::Message)]
720pub struct ConflictingConstraint {
721 #[prost(string, tag = "1")]
722 pub code: ::prost::alloc::string::String,
723 #[prost(string, tag = "2")]
724 pub description: ::prost::alloc::string::String,
725 #[prost(message, repeated, tag = "3")]
726 pub subjects: ::prost::alloc::vec::Vec<super::super::plan::v1::PlanViolationSubject>,
727}
728#[derive(Clone, PartialEq, ::prost::Message)]
729pub struct PlanInsights {
730 #[prost(string, tag = "1")]
731 pub skipped_reason: ::prost::alloc::string::String,
732 #[prost(message, repeated, tag = "2")]
733 pub critical_assets: ::prost::alloc::vec::Vec<CriticalAsset>,
734 #[prost(message, repeated, tag = "3")]
735 pub shadow_prices: ::prost::alloc::vec::Vec<CapacityShadowPrice>,
736 #[prost(message, repeated, tag = "4")]
737 pub relaxation_costs: ::prost::alloc::vec::Vec<RelaxationCost>,
738 #[prost(enumeration = "SolveInsight", repeated, packed = "false", tag = "5")]
739 pub incomplete_analyses: ::prost::alloc::vec::Vec<i32>,
740}
741#[derive(Clone, PartialEq, ::prost::Message)]
742pub struct CriticalAsset {
743 #[prost(string, tag = "1")]
744 pub asset_rid: ::prost::alloc::string::String,
745 #[prost(string, tag = "2")]
746 pub title: ::prost::alloc::string::String,
747 #[prost(int32, tag = "3")]
748 pub placements_lost: i32,
749 #[prost(message, repeated, tag = "4")]
750 pub coverage_lost: ::prost::alloc::vec::Vec<TierDelta>,
751 #[prost(int32, tag = "6")]
752 pub activity_count: i32,
753 #[prost(string, tag = "7")]
754 pub message: ::prost::alloc::string::String,
755 #[prost(message, optional, tag = "8")]
756 pub scheduled_time: ::core::option::Option<super::super::types::Duration>,
757}
758#[derive(Clone, PartialEq, ::prost::Message)]
759pub struct CapacityShadowPrice {
760 #[prost(string, tag = "1")]
761 pub asset_group_id: ::prost::alloc::string::String,
762 #[prost(string, tag = "2")]
763 pub example_resource_name: ::prost::alloc::string::String,
764 #[prost(int32, tag = "3")]
765 pub current_pool_size: i32,
766 #[prost(int32, tag = "4")]
767 pub additional_placements: i32,
768 #[prost(message, repeated, tag = "5")]
769 pub coverage_gained: ::prost::alloc::vec::Vec<TierDelta>,
770 #[prost(string, tag = "6")]
771 pub message: ::prost::alloc::string::String,
772}
773#[derive(Clone, PartialEq, ::prost::Message)]
774pub struct RelaxationCost {
775 #[prost(string, tag = "1")]
776 pub code: ::prost::alloc::string::String,
777 #[prost(string, tag = "2")]
778 pub description: ::prost::alloc::string::String,
779 #[prost(int32, tag = "3")]
780 pub additional_placements: i32,
781 #[prost(message, repeated, tag = "4")]
782 pub coverage_gained: ::prost::alloc::vec::Vec<TierDelta>,
783 #[prost(int32, tag = "5")]
784 pub elements_affected: i32,
785 #[prost(string, tag = "6")]
786 pub message: ::prost::alloc::string::String,
787}
788#[derive(Clone, PartialEq, ::prost::Message)]
789pub struct SolveStats {
790 #[prost(message, repeated, tag = "2")]
791 pub passes: ::prost::alloc::vec::Vec<SolvePass>,
792 #[prost(bool, tag = "3")]
793 pub passes_truncated: bool,
794 #[prost(string, tag = "4")]
795 pub solver_version: ::prost::alloc::string::String,
796 #[prost(message, repeated, tag = "9")]
797 pub stages: ::prost::alloc::vec::Vec<WideningStage>,
798 #[prost(message, optional, tag = "10")]
799 pub wall_time: ::core::option::Option<super::super::types::Duration>,
800 #[prost(message, optional, tag = "11")]
801 pub model_build_time: ::core::option::Option<super::super::types::Duration>,
802 #[prost(message, optional, tag = "12")]
803 pub native_init_time: ::core::option::Option<super::super::types::Duration>,
804 #[prost(message, optional, tag = "13")]
805 pub pass_wall_time: ::core::option::Option<super::super::types::Duration>,
806 #[prost(message, optional, tag = "14")]
807 pub settled_after: ::core::option::Option<super::super::types::Duration>,
808}
809#[derive(Clone, Copy, PartialEq, ::prost::Message)]
810pub struct WideningStage {
811 #[prost(int32, tag = "1")]
812 pub segment_count: i32,
813 #[prost(int32, tag = "2")]
814 pub placed_activity_count: i32,
815 #[prost(int32, tag = "3")]
816 pub unplaced_activity_count: i32,
817 #[prost(enumeration = "SolveStatus", tag = "4")]
818 pub status: i32,
819 #[prost(bool, tag = "6")]
820 pub converged: bool,
821 #[prost(message, optional, tag = "7")]
822 pub wall_time: ::core::option::Option<super::super::types::Duration>,
823}
824#[derive(Clone, PartialEq, ::prost::Message)]
825pub struct SolvePass {
826 #[prost(string, tag = "1")]
827 pub name: ::prost::alloc::string::String,
828 #[prost(enumeration = "SolvePassStatus", tag = "2")]
829 pub status: i32,
830 #[prost(int64, optional, tag = "3")]
831 pub objective_value: ::core::option::Option<i64>,
832 #[prost(int64, optional, tag = "5")]
833 pub objective_bound: ::core::option::Option<i64>,
834 #[prost(double, optional, tag = "6")]
835 pub deterministic_time: ::core::option::Option<f64>,
836 #[prost(message, optional, tag = "7")]
837 pub wall_time: ::core::option::Option<super::super::types::Duration>,
838}
839#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
840#[repr(i32)]
841pub enum SolveJobState {
842 Unspecified = 0,
843 Pending = 1,
844 Running = 2,
845 Succeeded = 3,
846 Failed = 4,
847 Cancelled = 5,
848}
849impl SolveJobState {
850 pub fn as_str_name(&self) -> &'static str {
855 match self {
856 Self::Unspecified => "SOLVE_JOB_STATE_UNSPECIFIED",
857 Self::Pending => "SOLVE_JOB_STATE_PENDING",
858 Self::Running => "SOLVE_JOB_STATE_RUNNING",
859 Self::Succeeded => "SOLVE_JOB_STATE_SUCCEEDED",
860 Self::Failed => "SOLVE_JOB_STATE_FAILED",
861 Self::Cancelled => "SOLVE_JOB_STATE_CANCELLED",
862 }
863 }
864 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
866 match value {
867 "SOLVE_JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
868 "SOLVE_JOB_STATE_PENDING" => Some(Self::Pending),
869 "SOLVE_JOB_STATE_RUNNING" => Some(Self::Running),
870 "SOLVE_JOB_STATE_SUCCEEDED" => Some(Self::Succeeded),
871 "SOLVE_JOB_STATE_FAILED" => Some(Self::Failed),
872 "SOLVE_JOB_STATE_CANCELLED" => Some(Self::Cancelled),
873 _ => None,
874 }
875 }
876}
877#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
878#[repr(i32)]
879pub enum SolvePhase {
880 Unspecified = 0,
881 Ranking = 1,
882 TieBreaking = 2,
883 Recovering = 3,
884 Alternatives = 4,
885 Explaining = 5,
886 Insights = 6,
887}
888impl SolvePhase {
889 pub fn as_str_name(&self) -> &'static str {
894 match self {
895 Self::Unspecified => "SOLVE_PHASE_UNSPECIFIED",
896 Self::Ranking => "SOLVE_PHASE_RANKING",
897 Self::TieBreaking => "SOLVE_PHASE_TIE_BREAKING",
898 Self::Recovering => "SOLVE_PHASE_RECOVERING",
899 Self::Alternatives => "SOLVE_PHASE_ALTERNATIVES",
900 Self::Explaining => "SOLVE_PHASE_EXPLAINING",
901 Self::Insights => "SOLVE_PHASE_INSIGHTS",
902 }
903 }
904 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
906 match value {
907 "SOLVE_PHASE_UNSPECIFIED" => Some(Self::Unspecified),
908 "SOLVE_PHASE_RANKING" => Some(Self::Ranking),
909 "SOLVE_PHASE_TIE_BREAKING" => Some(Self::TieBreaking),
910 "SOLVE_PHASE_RECOVERING" => Some(Self::Recovering),
911 "SOLVE_PHASE_ALTERNATIVES" => Some(Self::Alternatives),
912 "SOLVE_PHASE_EXPLAINING" => Some(Self::Explaining),
913 "SOLVE_PHASE_INSIGHTS" => Some(Self::Insights),
914 _ => None,
915 }
916 }
917}
918#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
919#[repr(i32)]
920pub enum SolveInsight {
921 Unspecified = 0,
922 PlacementFlexibility = 1,
923 CriticalAssets = 2,
924 CapacityShadowPrices = 3,
925 RelaxationCosts = 4,
926}
927impl SolveInsight {
928 pub fn as_str_name(&self) -> &'static str {
933 match self {
934 Self::Unspecified => "SOLVE_INSIGHT_UNSPECIFIED",
935 Self::PlacementFlexibility => "SOLVE_INSIGHT_PLACEMENT_FLEXIBILITY",
936 Self::CriticalAssets => "SOLVE_INSIGHT_CRITICAL_ASSETS",
937 Self::CapacityShadowPrices => "SOLVE_INSIGHT_CAPACITY_SHADOW_PRICES",
938 Self::RelaxationCosts => "SOLVE_INSIGHT_RELAXATION_COSTS",
939 }
940 }
941 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
943 match value {
944 "SOLVE_INSIGHT_UNSPECIFIED" => Some(Self::Unspecified),
945 "SOLVE_INSIGHT_PLACEMENT_FLEXIBILITY" => Some(Self::PlacementFlexibility),
946 "SOLVE_INSIGHT_CRITICAL_ASSETS" => Some(Self::CriticalAssets),
947 "SOLVE_INSIGHT_CAPACITY_SHADOW_PRICES" => Some(Self::CapacityShadowPrices),
948 "SOLVE_INSIGHT_RELAXATION_COSTS" => Some(Self::RelaxationCosts),
949 _ => None,
950 }
951 }
952}
953#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
954#[repr(i32)]
955pub enum ProblemDetail {
956 Unspecified = 0,
957 None = 1,
958 Counts = 2,
959 Pools = 3,
960 Full = 4,
961}
962impl ProblemDetail {
963 pub fn as_str_name(&self) -> &'static str {
968 match self {
969 Self::Unspecified => "PROBLEM_DETAIL_UNSPECIFIED",
970 Self::None => "PROBLEM_DETAIL_NONE",
971 Self::Counts => "PROBLEM_DETAIL_COUNTS",
972 Self::Pools => "PROBLEM_DETAIL_POOLS",
973 Self::Full => "PROBLEM_DETAIL_FULL",
974 }
975 }
976 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
978 match value {
979 "PROBLEM_DETAIL_UNSPECIFIED" => Some(Self::Unspecified),
980 "PROBLEM_DETAIL_NONE" => Some(Self::None),
981 "PROBLEM_DETAIL_COUNTS" => Some(Self::Counts),
982 "PROBLEM_DETAIL_POOLS" => Some(Self::Pools),
983 "PROBLEM_DETAIL_FULL" => Some(Self::Full),
984 _ => None,
985 }
986 }
987}
988#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
989#[repr(i32)]
990pub enum SolveMode {
991 Unspecified = 0,
992 Ranked = 1,
993 FeasibleFast = 2,
994}
995impl SolveMode {
996 pub fn as_str_name(&self) -> &'static str {
1001 match self {
1002 Self::Unspecified => "SOLVE_MODE_UNSPECIFIED",
1003 Self::Ranked => "SOLVE_MODE_RANKED",
1004 Self::FeasibleFast => "SOLVE_MODE_FEASIBLE_FAST",
1005 }
1006 }
1007 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1009 match value {
1010 "SOLVE_MODE_UNSPECIFIED" => Some(Self::Unspecified),
1011 "SOLVE_MODE_RANKED" => Some(Self::Ranked),
1012 "SOLVE_MODE_FEASIBLE_FAST" => Some(Self::FeasibleFast),
1013 _ => None,
1014 }
1015 }
1016}
1017#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1018#[repr(i32)]
1019pub enum ObjectiveCoverage {
1020 Unspecified = 0,
1021 AnyActivity = 1,
1022 AllActivities = 2,
1023}
1024impl ObjectiveCoverage {
1025 pub fn as_str_name(&self) -> &'static str {
1030 match self {
1031 Self::Unspecified => "OBJECTIVE_COVERAGE_UNSPECIFIED",
1032 Self::AnyActivity => "OBJECTIVE_COVERAGE_ANY_ACTIVITY",
1033 Self::AllActivities => "OBJECTIVE_COVERAGE_ALL_ACTIVITIES",
1034 }
1035 }
1036 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1038 match value {
1039 "OBJECTIVE_COVERAGE_UNSPECIFIED" => Some(Self::Unspecified),
1040 "OBJECTIVE_COVERAGE_ANY_ACTIVITY" => Some(Self::AnyActivity),
1041 "OBJECTIVE_COVERAGE_ALL_ACTIVITIES" => Some(Self::AllActivities),
1042 _ => None,
1043 }
1044 }
1045}
1046#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1047#[repr(i32)]
1048pub enum SolveStopReason {
1049 Unspecified = 0,
1050 Proven = 1,
1051 CeilingReached = 2,
1052 Interrupted = 3,
1053}
1054impl SolveStopReason {
1055 pub fn as_str_name(&self) -> &'static str {
1060 match self {
1061 Self::Unspecified => "SOLVE_STOP_REASON_UNSPECIFIED",
1062 Self::Proven => "SOLVE_STOP_REASON_PROVEN",
1063 Self::CeilingReached => "SOLVE_STOP_REASON_CEILING_REACHED",
1064 Self::Interrupted => "SOLVE_STOP_REASON_INTERRUPTED",
1065 }
1066 }
1067 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1069 match value {
1070 "SOLVE_STOP_REASON_UNSPECIFIED" => Some(Self::Unspecified),
1071 "SOLVE_STOP_REASON_PROVEN" => Some(Self::Proven),
1072 "SOLVE_STOP_REASON_CEILING_REACHED" => Some(Self::CeilingReached),
1073 "SOLVE_STOP_REASON_INTERRUPTED" => Some(Self::Interrupted),
1074 _ => None,
1075 }
1076 }
1077}
1078#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1079#[repr(i32)]
1080pub enum SolveStatus {
1081 Unspecified = 0,
1082 Optimal = 1,
1083 Feasible = 2,
1084 Infeasible = 3,
1085 NoSolutionFound = 4,
1086 ModelInvalid = 5,
1087 Unranked = 6,
1088}
1089impl SolveStatus {
1090 pub fn as_str_name(&self) -> &'static str {
1095 match self {
1096 Self::Unspecified => "SOLVE_STATUS_UNSPECIFIED",
1097 Self::Optimal => "SOLVE_STATUS_OPTIMAL",
1098 Self::Feasible => "SOLVE_STATUS_FEASIBLE",
1099 Self::Infeasible => "SOLVE_STATUS_INFEASIBLE",
1100 Self::NoSolutionFound => "SOLVE_STATUS_NO_SOLUTION_FOUND",
1101 Self::ModelInvalid => "SOLVE_STATUS_MODEL_INVALID",
1102 Self::Unranked => "SOLVE_STATUS_UNRANKED",
1103 }
1104 }
1105 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1107 match value {
1108 "SOLVE_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1109 "SOLVE_STATUS_OPTIMAL" => Some(Self::Optimal),
1110 "SOLVE_STATUS_FEASIBLE" => Some(Self::Feasible),
1111 "SOLVE_STATUS_INFEASIBLE" => Some(Self::Infeasible),
1112 "SOLVE_STATUS_NO_SOLUTION_FOUND" => Some(Self::NoSolutionFound),
1113 "SOLVE_STATUS_MODEL_INVALID" => Some(Self::ModelInvalid),
1114 "SOLVE_STATUS_UNRANKED" => Some(Self::Unranked),
1115 _ => None,
1116 }
1117 }
1118}
1119#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1120#[repr(i32)]
1121pub enum SolvePassStatus {
1122 Unspecified = 0,
1123 Optimal = 1,
1124 Feasible = 2,
1125 Infeasible = 3,
1126 NoSolutionFound = 4,
1127 ModelInvalid = 5,
1128}
1129impl SolvePassStatus {
1130 pub fn as_str_name(&self) -> &'static str {
1135 match self {
1136 Self::Unspecified => "SOLVE_PASS_STATUS_UNSPECIFIED",
1137 Self::Optimal => "SOLVE_PASS_STATUS_OPTIMAL",
1138 Self::Feasible => "SOLVE_PASS_STATUS_FEASIBLE",
1139 Self::Infeasible => "SOLVE_PASS_STATUS_INFEASIBLE",
1140 Self::NoSolutionFound => "SOLVE_PASS_STATUS_NO_SOLUTION_FOUND",
1141 Self::ModelInvalid => "SOLVE_PASS_STATUS_MODEL_INVALID",
1142 }
1143 }
1144 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1146 match value {
1147 "SOLVE_PASS_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
1148 "SOLVE_PASS_STATUS_OPTIMAL" => Some(Self::Optimal),
1149 "SOLVE_PASS_STATUS_FEASIBLE" => Some(Self::Feasible),
1150 "SOLVE_PASS_STATUS_INFEASIBLE" => Some(Self::Infeasible),
1151 "SOLVE_PASS_STATUS_NO_SOLUTION_FOUND" => Some(Self::NoSolutionFound),
1152 "SOLVE_PASS_STATUS_MODEL_INVALID" => Some(Self::ModelInvalid),
1153 _ => None,
1154 }
1155 }
1156}
1157#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1158#[repr(i32)]
1159pub enum SolverTimezoneSource {
1160 Unspecified = 0,
1161 Declared = 1,
1162 Inferred = 2,
1163}
1164impl SolverTimezoneSource {
1165 pub fn as_str_name(&self) -> &'static str {
1170 match self {
1171 Self::Unspecified => "SOLVER_TIMEZONE_SOURCE_UNSPECIFIED",
1172 Self::Declared => "SOLVER_TIMEZONE_SOURCE_DECLARED",
1173 Self::Inferred => "SOLVER_TIMEZONE_SOURCE_INFERRED",
1174 }
1175 }
1176 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1178 match value {
1179 "SOLVER_TIMEZONE_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
1180 "SOLVER_TIMEZONE_SOURCE_DECLARED" => Some(Self::Declared),
1181 "SOLVER_TIMEZONE_SOURCE_INFERRED" => Some(Self::Inferred),
1182 _ => None,
1183 }
1184 }
1185}
1186#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1187#[repr(i32)]
1188pub enum SolverActivityScope {
1189 Unspecified = 0,
1190 InScope = 1,
1191 Held = 2,
1192 OutsideScope = 3,
1193}
1194impl SolverActivityScope {
1195 pub fn as_str_name(&self) -> &'static str {
1200 match self {
1201 Self::Unspecified => "SOLVER_ACTIVITY_SCOPE_UNSPECIFIED",
1202 Self::InScope => "SOLVER_ACTIVITY_SCOPE_IN_SCOPE",
1203 Self::Held => "SOLVER_ACTIVITY_SCOPE_HELD",
1204 Self::OutsideScope => "SOLVER_ACTIVITY_SCOPE_OUTSIDE_SCOPE",
1205 }
1206 }
1207 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1209 match value {
1210 "SOLVER_ACTIVITY_SCOPE_UNSPECIFIED" => Some(Self::Unspecified),
1211 "SOLVER_ACTIVITY_SCOPE_IN_SCOPE" => Some(Self::InScope),
1212 "SOLVER_ACTIVITY_SCOPE_HELD" => Some(Self::Held),
1213 "SOLVER_ACTIVITY_SCOPE_OUTSIDE_SCOPE" => Some(Self::OutsideScope),
1214 _ => None,
1215 }
1216 }
1217}
1218#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1219#[repr(i32)]
1220pub enum SolverDurationSource {
1221 Unspecified = 0,
1222 DescriptionBlock = 1,
1223 Defaulted = 2,
1224 ExistingWindow = 3,
1225 PlannedDuration = 4,
1226}
1227impl SolverDurationSource {
1228 pub fn as_str_name(&self) -> &'static str {
1233 match self {
1234 Self::Unspecified => "SOLVER_DURATION_SOURCE_UNSPECIFIED",
1235 Self::DescriptionBlock => "SOLVER_DURATION_SOURCE_DESCRIPTION_BLOCK",
1236 Self::Defaulted => "SOLVER_DURATION_SOURCE_DEFAULTED",
1237 Self::ExistingWindow => "SOLVER_DURATION_SOURCE_EXISTING_WINDOW",
1238 Self::PlannedDuration => "SOLVER_DURATION_SOURCE_PLANNED_DURATION",
1239 }
1240 }
1241 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1243 match value {
1244 "SOLVER_DURATION_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
1245 "SOLVER_DURATION_SOURCE_DESCRIPTION_BLOCK" => Some(Self::DescriptionBlock),
1246 "SOLVER_DURATION_SOURCE_DEFAULTED" => Some(Self::Defaulted),
1247 "SOLVER_DURATION_SOURCE_EXISTING_WINDOW" => Some(Self::ExistingWindow),
1248 "SOLVER_DURATION_SOURCE_PLANNED_DURATION" => Some(Self::PlannedDuration),
1249 _ => None,
1250 }
1251 }
1252}
1253#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1254#[repr(i32)]
1255pub enum SolverResourceResolution {
1256 Unspecified = 0,
1257 Resolved = 1,
1258 NoCandidatePool = 2,
1259 EmptyPool = 3,
1260 AllCandidatesExcluded = 4,
1261 InsufficientCandidates = 5,
1262}
1263impl SolverResourceResolution {
1264 pub fn as_str_name(&self) -> &'static str {
1269 match self {
1270 Self::Unspecified => "SOLVER_RESOURCE_RESOLUTION_UNSPECIFIED",
1271 Self::Resolved => "SOLVER_RESOURCE_RESOLUTION_RESOLVED",
1272 Self::NoCandidatePool => "SOLVER_RESOURCE_RESOLUTION_NO_CANDIDATE_POOL",
1273 Self::EmptyPool => "SOLVER_RESOURCE_RESOLUTION_EMPTY_POOL",
1274 Self::AllCandidatesExcluded => {
1275 "SOLVER_RESOURCE_RESOLUTION_ALL_CANDIDATES_EXCLUDED"
1276 }
1277 Self::InsufficientCandidates => {
1278 "SOLVER_RESOURCE_RESOLUTION_INSUFFICIENT_CANDIDATES"
1279 }
1280 }
1281 }
1282 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1284 match value {
1285 "SOLVER_RESOURCE_RESOLUTION_UNSPECIFIED" => Some(Self::Unspecified),
1286 "SOLVER_RESOURCE_RESOLUTION_RESOLVED" => Some(Self::Resolved),
1287 "SOLVER_RESOURCE_RESOLUTION_NO_CANDIDATE_POOL" => Some(Self::NoCandidatePool),
1288 "SOLVER_RESOURCE_RESOLUTION_EMPTY_POOL" => Some(Self::EmptyPool),
1289 "SOLVER_RESOURCE_RESOLUTION_ALL_CANDIDATES_EXCLUDED" => {
1290 Some(Self::AllCandidatesExcluded)
1291 }
1292 "SOLVER_RESOURCE_RESOLUTION_INSUFFICIENT_CANDIDATES" => {
1293 Some(Self::InsufficientCandidates)
1294 }
1295 _ => None,
1296 }
1297 }
1298}
1299#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1300#[repr(i32)]
1301pub enum MoveKind {
1302 Unspecified = 0,
1303 TimeShift = 1,
1304 Rescheduled = 2,
1305 Dropped = 3,
1306 Added = 4,
1307}
1308impl MoveKind {
1309 pub fn as_str_name(&self) -> &'static str {
1314 match self {
1315 Self::Unspecified => "MOVE_KIND_UNSPECIFIED",
1316 Self::TimeShift => "MOVE_KIND_TIME_SHIFT",
1317 Self::Rescheduled => "MOVE_KIND_RESCHEDULED",
1318 Self::Dropped => "MOVE_KIND_DROPPED",
1319 Self::Added => "MOVE_KIND_ADDED",
1320 }
1321 }
1322 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1324 match value {
1325 "MOVE_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1326 "MOVE_KIND_TIME_SHIFT" => Some(Self::TimeShift),
1327 "MOVE_KIND_RESCHEDULED" => Some(Self::Rescheduled),
1328 "MOVE_KIND_DROPPED" => Some(Self::Dropped),
1329 "MOVE_KIND_ADDED" => Some(Self::Added),
1330 _ => None,
1331 }
1332 }
1333}
1334pub mod plan_solver_service_client {
1336 #![allow(
1337 unused_variables,
1338 dead_code,
1339 missing_docs,
1340 clippy::wildcard_imports,
1341 clippy::let_unit_value,
1342 )]
1343 use tonic::codegen::*;
1344 use tonic::codegen::http::Uri;
1345 #[derive(Debug, Clone)]
1346 pub struct PlanSolverServiceClient<T> {
1347 inner: tonic::client::Grpc<T>,
1348 }
1349 impl PlanSolverServiceClient<tonic::transport::Channel> {
1350 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1352 where
1353 D: TryInto<tonic::transport::Endpoint>,
1354 D::Error: Into<StdError>,
1355 {
1356 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1357 Ok(Self::new(conn))
1358 }
1359 }
1360 impl<T> PlanSolverServiceClient<T>
1361 where
1362 T: tonic::client::GrpcService<tonic::body::Body>,
1363 T::Error: Into<StdError>,
1364 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1365 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1366 {
1367 pub fn new(inner: T) -> Self {
1368 let inner = tonic::client::Grpc::new(inner);
1369 Self { inner }
1370 }
1371 pub fn with_origin(inner: T, origin: Uri) -> Self {
1372 let inner = tonic::client::Grpc::with_origin(inner, origin);
1373 Self { inner }
1374 }
1375 pub fn with_interceptor<F>(
1376 inner: T,
1377 interceptor: F,
1378 ) -> PlanSolverServiceClient<InterceptedService<T, F>>
1379 where
1380 F: tonic::service::Interceptor,
1381 T::ResponseBody: Default,
1382 T: tonic::codegen::Service<
1383 http::Request<tonic::body::Body>,
1384 Response = http::Response<
1385 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1386 >,
1387 >,
1388 <T as tonic::codegen::Service<
1389 http::Request<tonic::body::Body>,
1390 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1391 {
1392 PlanSolverServiceClient::new(InterceptedService::new(inner, interceptor))
1393 }
1394 #[must_use]
1399 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1400 self.inner = self.inner.send_compressed(encoding);
1401 self
1402 }
1403 #[must_use]
1405 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1406 self.inner = self.inner.accept_compressed(encoding);
1407 self
1408 }
1409 #[must_use]
1413 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1414 self.inner = self.inner.max_decoding_message_size(limit);
1415 self
1416 }
1417 #[must_use]
1421 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1422 self.inner = self.inner.max_encoding_message_size(limit);
1423 self
1424 }
1425 pub async fn solve_plan(
1426 &mut self,
1427 request: impl tonic::IntoRequest<super::SolvePlanRequest>,
1428 ) -> std::result::Result<
1429 tonic::Response<super::SolvePlanResponse>,
1430 tonic::Status,
1431 > {
1432 self.inner
1433 .ready()
1434 .await
1435 .map_err(|e| {
1436 tonic::Status::unknown(
1437 format!("Service was not ready: {}", e.into()),
1438 )
1439 })?;
1440 let codec = tonic::codec::ProstCodec::default();
1441 let path = http::uri::PathAndQuery::from_static(
1442 "/nominal.plansolver.v1.PlanSolverService/SolvePlan",
1443 );
1444 let mut req = request.into_request();
1445 req.extensions_mut()
1446 .insert(
1447 GrpcMethod::new(
1448 "nominal.plansolver.v1.PlanSolverService",
1449 "SolvePlan",
1450 ),
1451 );
1452 self.inner.unary(req, path, codec).await
1453 }
1454 pub async fn create_solve_job(
1455 &mut self,
1456 request: impl tonic::IntoRequest<super::CreateSolveJobRequest>,
1457 ) -> std::result::Result<
1458 tonic::Response<super::CreateSolveJobResponse>,
1459 tonic::Status,
1460 > {
1461 self.inner
1462 .ready()
1463 .await
1464 .map_err(|e| {
1465 tonic::Status::unknown(
1466 format!("Service was not ready: {}", e.into()),
1467 )
1468 })?;
1469 let codec = tonic::codec::ProstCodec::default();
1470 let path = http::uri::PathAndQuery::from_static(
1471 "/nominal.plansolver.v1.PlanSolverService/CreateSolveJob",
1472 );
1473 let mut req = request.into_request();
1474 req.extensions_mut()
1475 .insert(
1476 GrpcMethod::new(
1477 "nominal.plansolver.v1.PlanSolverService",
1478 "CreateSolveJob",
1479 ),
1480 );
1481 self.inner.unary(req, path, codec).await
1482 }
1483 pub async fn get_solve_job(
1484 &mut self,
1485 request: impl tonic::IntoRequest<super::GetSolveJobRequest>,
1486 ) -> std::result::Result<
1487 tonic::Response<super::GetSolveJobResponse>,
1488 tonic::Status,
1489 > {
1490 self.inner
1491 .ready()
1492 .await
1493 .map_err(|e| {
1494 tonic::Status::unknown(
1495 format!("Service was not ready: {}", e.into()),
1496 )
1497 })?;
1498 let codec = tonic::codec::ProstCodec::default();
1499 let path = http::uri::PathAndQuery::from_static(
1500 "/nominal.plansolver.v1.PlanSolverService/GetSolveJob",
1501 );
1502 let mut req = request.into_request();
1503 req.extensions_mut()
1504 .insert(
1505 GrpcMethod::new(
1506 "nominal.plansolver.v1.PlanSolverService",
1507 "GetSolveJob",
1508 ),
1509 );
1510 self.inner.unary(req, path, codec).await
1511 }
1512 pub async fn cancel_solve_job(
1513 &mut self,
1514 request: impl tonic::IntoRequest<super::CancelSolveJobRequest>,
1515 ) -> std::result::Result<
1516 tonic::Response<super::CancelSolveJobResponse>,
1517 tonic::Status,
1518 > {
1519 self.inner
1520 .ready()
1521 .await
1522 .map_err(|e| {
1523 tonic::Status::unknown(
1524 format!("Service was not ready: {}", e.into()),
1525 )
1526 })?;
1527 let codec = tonic::codec::ProstCodec::default();
1528 let path = http::uri::PathAndQuery::from_static(
1529 "/nominal.plansolver.v1.PlanSolverService/CancelSolveJob",
1530 );
1531 let mut req = request.into_request();
1532 req.extensions_mut()
1533 .insert(
1534 GrpcMethod::new(
1535 "nominal.plansolver.v1.PlanSolverService",
1536 "CancelSolveJob",
1537 ),
1538 );
1539 self.inner.unary(req, path, codec).await
1540 }
1541 }
1542}