1#[derive(Clone, PartialEq, ::prost::Message)]
3pub struct Plan {
4 #[prost(string, tag = "1")]
5 pub rid: ::prost::alloc::string::String,
6 #[prost(message, optional, tag = "2")]
7 pub metadata: ::core::option::Option<PlanMetadata>,
8 #[prost(message, optional, tag = "3")]
9 pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
10 #[prost(message, optional, tag = "4")]
11 pub content: ::core::option::Option<PlanContent>,
12}
13#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct PlanSummary {
15 #[prost(string, tag = "1")]
16 pub rid: ::prost::alloc::string::String,
17 #[prost(message, optional, tag = "2")]
18 pub metadata: ::core::option::Option<PlanMetadata>,
19 #[prost(message, optional, tag = "3")]
20 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
21 #[prost(message, optional, tag = "4")]
22 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
23 #[prost(message, optional, tag = "5")]
24 pub earliest_scheduled_start: ::core::option::Option<
25 super::super::super::google::protobuf::Timestamp,
26 >,
27 #[prost(message, optional, tag = "6")]
28 pub latest_scheduled_end: ::core::option::Option<
29 super::super::super::google::protobuf::Timestamp,
30 >,
31}
32#[derive(Clone, PartialEq, ::prost::Message)]
33pub struct PlanMetadata {
34 #[prost(string, tag = "1")]
35 pub title: ::prost::alloc::string::String,
36 #[prost(string, tag = "2")]
37 pub description: ::prost::alloc::string::String,
38 #[prost(string, repeated, tag = "3")]
39 pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
40 #[prost(map = "string, string", tag = "4")]
41 pub properties: ::std::collections::HashMap<
42 ::prost::alloc::string::String,
43 ::prost::alloc::string::String,
44 >,
45 #[prost(bool, tag = "5")]
46 pub is_archived: bool,
47 #[prost(bool, optional, tag = "6")]
48 pub is_published: ::core::option::Option<bool>,
49 #[prost(string, tag = "7")]
50 pub created_by: ::prost::alloc::string::String,
51 #[prost(message, optional, tag = "8")]
52 pub created_at: ::core::option::Option<
53 super::super::super::google::protobuf::Timestamp,
54 >,
55 #[prost(message, optional, tag = "9")]
56 pub updated_at: ::core::option::Option<
57 super::super::super::google::protobuf::Timestamp,
58 >,
59 #[prost(message, optional, tag = "10")]
60 pub edited_at: ::core::option::Option<
61 super::super::super::google::protobuf::Timestamp,
62 >,
63 #[prost(string, tag = "11")]
64 pub workspace_rid: ::prost::alloc::string::String,
65 #[prost(string, tag = "12")]
66 pub updated_by: ::prost::alloc::string::String,
67}
68#[derive(Clone, PartialEq, ::prost::Message)]
69pub struct PlanContent {
70 #[prost(oneof = "plan_content::PlanContent", tags = "1")]
71 pub plan_content: ::core::option::Option<plan_content::PlanContent>,
72}
73pub mod plan_content {
75 #[derive(Clone, PartialEq, ::prost::Oneof)]
76 pub enum PlanContent {
77 #[prost(message, tag = "1")]
78 V1(super::PlanContentV1),
79 }
80}
81#[derive(Clone, PartialEq, ::prost::Message)]
82pub struct PlanContentV1 {
83 #[prost(message, optional, tag = "1")]
84 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
85 #[prost(message, optional, tag = "2")]
86 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
87 #[prost(message, repeated, tag = "3")]
88 pub objectives: ::prost::alloc::vec::Vec<Objective>,
89 #[prost(message, repeated, tag = "4")]
90 pub activities: ::prost::alloc::vec::Vec<Activity>,
91 #[prost(message, repeated, tag = "5")]
92 pub segments: ::prost::alloc::vec::Vec<Segment>,
93 #[prost(message, repeated, tag = "6")]
94 pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
95 #[prost(message, repeated, tag = "7")]
96 pub milestones: ::prost::alloc::vec::Vec<Milestone>,
97}
98#[derive(Clone, PartialEq, ::prost::Message)]
99pub struct Milestone {
100 #[prost(string, tag = "1")]
101 pub id: ::prost::alloc::string::String,
102 #[prost(string, tag = "2")]
103 pub name: ::prost::alloc::string::String,
104 #[prost(string, optional, tag = "3")]
105 pub description: ::core::option::Option<::prost::alloc::string::String>,
106}
107#[derive(Clone, PartialEq, ::prost::Message)]
108pub struct Activity {
109 #[prost(string, tag = "1")]
110 pub id: ::prost::alloc::string::String,
111 #[prost(string, tag = "2")]
112 pub name: ::prost::alloc::string::String,
113 #[prost(string, optional, tag = "3")]
114 pub description: ::core::option::Option<::prost::alloc::string::String>,
115 #[prost(message, optional, tag = "4")]
116 pub details: ::core::option::Option<ActivityDetails>,
117}
118#[derive(Clone, PartialEq, ::prost::Message)]
119pub struct ActivityDetails {
120 #[prost(oneof = "activity_details::ActivityDetails", tags = "1")]
121 pub activity_details: ::core::option::Option<activity_details::ActivityDetails>,
122}
123pub mod activity_details {
125 #[derive(Clone, PartialEq, ::prost::Oneof)]
126 pub enum ActivityDetails {
127 #[prost(message, tag = "1")]
128 Single(super::SingleActivity),
129 }
130}
131#[derive(Clone, PartialEq, ::prost::Message)]
132pub struct SingleActivity {
133 #[prost(message, optional, tag = "1")]
134 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
135 #[prost(message, optional, tag = "2")]
136 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
137 #[prost(string, optional, tag = "3")]
138 pub segment_id: ::core::option::Option<::prost::alloc::string::String>,
139 #[prost(string, repeated, tag = "4")]
140 pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
141 #[prost(message, optional, tag = "5")]
142 pub status: ::core::option::Option<ActivityStatus>,
143}
144#[derive(Clone, PartialEq, ::prost::Message)]
145pub struct ActivityStatus {
146 #[prost(oneof = "activity_status::ActivityStatus", tags = "1, 2, 3, 4, 5")]
147 pub activity_status: ::core::option::Option<activity_status::ActivityStatus>,
148}
149pub mod activity_status {
151 #[derive(Clone, PartialEq, ::prost::Oneof)]
152 pub enum ActivityStatus {
153 #[prost(message, tag = "1")]
154 Created(super::CreatedActivity),
155 #[prost(message, tag = "2")]
156 Finalized(super::FinalizedActivity),
157 #[prost(message, tag = "3")]
158 InProgress(super::InProgressActivity),
159 #[prost(message, tag = "4")]
160 Completed(super::CompletedActivity),
161 #[prost(message, tag = "5")]
162 Cancelled(super::CancelledActivity),
163 }
164}
165#[derive(Clone, Copy, PartialEq, ::prost::Message)]
166pub struct CreatedActivity {}
167#[derive(Clone, Copy, PartialEq, ::prost::Message)]
168pub struct FinalizedActivity {}
169#[derive(Clone, Copy, PartialEq, ::prost::Message)]
170pub struct InProgressActivity {}
171#[derive(Clone, PartialEq, ::prost::Message)]
172pub struct CompletedActivity {
173 #[prost(string, optional, tag = "1")]
174 pub notes: ::core::option::Option<::prost::alloc::string::String>,
175}
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct CancelledActivity {
178 #[prost(string, tag = "1")]
179 pub reason: ::prost::alloc::string::String,
180 #[prost(string, optional, tag = "2")]
181 pub notes: ::core::option::Option<::prost::alloc::string::String>,
182}
183#[derive(Clone, PartialEq, ::prost::Message)]
184pub struct Objective {
185 #[prost(string, tag = "1")]
186 pub id: ::prost::alloc::string::String,
187 #[prost(string, tag = "2")]
188 pub name: ::prost::alloc::string::String,
189 #[prost(string, tag = "3")]
190 pub creator: ::prost::alloc::string::String,
191 #[prost(message, optional, tag = "4")]
192 pub created_at: ::core::option::Option<
193 super::super::super::google::protobuf::Timestamp,
194 >,
195 #[prost(enumeration = "super::super::types::Priority", tag = "5")]
196 pub priority: i32,
197 #[prost(string, repeated, tag = "6")]
198 pub milestone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
199 #[prost(string, optional, tag = "7")]
200 pub description: ::core::option::Option<::prost::alloc::string::String>,
201 #[prost(message, optional, tag = "8")]
202 pub details: ::core::option::Option<ObjectiveDetails>,
203 #[prost(message, optional, tag = "9")]
204 pub status: ::core::option::Option<ObjectiveStatus>,
205}
206#[derive(Clone, PartialEq, ::prost::Message)]
207pub struct ObjectiveStatus {
208 #[prost(oneof = "objective_status::ObjectiveStatus", tags = "1, 2, 3, 4, 5")]
209 pub objective_status: ::core::option::Option<objective_status::ObjectiveStatus>,
210}
211pub mod objective_status {
213 #[derive(Clone, PartialEq, ::prost::Oneof)]
214 pub enum ObjectiveStatus {
215 #[prost(message, tag = "1")]
216 Draft(super::DraftObjective),
217 #[prost(message, tag = "2")]
218 Proposed(super::ProposedObjective),
219 #[prost(message, tag = "3")]
220 Finalized(super::FinalizedObjective),
221 #[prost(message, tag = "4")]
222 Completed(super::CompletedObjective),
223 #[prost(message, tag = "5")]
224 Rejected(super::RejectedObjective),
225 }
226}
227#[derive(Clone, Copy, PartialEq, ::prost::Message)]
228pub struct DraftObjective {}
229#[derive(Clone, Copy, PartialEq, ::prost::Message)]
230pub struct ProposedObjective {}
231#[derive(Clone, Copy, PartialEq, ::prost::Message)]
232pub struct FinalizedObjective {}
233#[derive(Clone, PartialEq, ::prost::Message)]
234pub struct CompletedObjective {
235 #[prost(message, optional, tag = "1")]
236 pub disposition: ::core::option::Option<ObjectiveDisposition>,
237}
238#[derive(Clone, PartialEq, ::prost::Message)]
239pub struct RejectedObjective {
240 #[prost(string, tag = "1")]
241 pub reason: ::prost::alloc::string::String,
242}
243#[derive(Clone, PartialEq, ::prost::Message)]
244pub struct ObjectiveDisposition {
245 #[prost(oneof = "objective_disposition::ObjectiveDisposition", tags = "1, 2")]
246 pub objective_disposition: ::core::option::Option<
247 objective_disposition::ObjectiveDisposition,
248 >,
249}
250pub mod objective_disposition {
252 #[derive(Clone, PartialEq, ::prost::Oneof)]
253 pub enum ObjectiveDisposition {
254 #[prost(message, tag = "1")]
255 Successful(super::SuccessfulObjective),
256 #[prost(message, tag = "2")]
257 Failed(super::FailedObjective),
258 }
259}
260#[derive(Clone, PartialEq, ::prost::Message)]
261pub struct SuccessfulObjective {
262 #[prost(string, optional, tag = "1")]
263 pub notes: ::core::option::Option<::prost::alloc::string::String>,
264}
265#[derive(Clone, PartialEq, ::prost::Message)]
266pub struct FailedObjective {
267 #[prost(string, tag = "1")]
268 pub reason: ::prost::alloc::string::String,
269 #[prost(string, optional, tag = "2")]
270 pub notes: ::core::option::Option<::prost::alloc::string::String>,
271}
272#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct ObjectiveDetails {
274 #[prost(oneof = "objective_details::ObjectiveDetails", tags = "1")]
275 pub objective_details: ::core::option::Option<objective_details::ObjectiveDetails>,
276}
277pub mod objective_details {
279 #[derive(Clone, PartialEq, ::prost::Oneof)]
280 pub enum ObjectiveDetails {
281 #[prost(message, tag = "1")]
282 Simple(super::SimpleObjective),
283 }
284}
285#[derive(Clone, PartialEq, ::prost::Message)]
286pub struct SimpleObjective {
287 #[prost(message, repeated, tag = "1")]
288 pub resources: ::prost::alloc::vec::Vec<Resource>,
289}
290#[derive(Clone, PartialEq, ::prost::Message)]
291pub struct Resource {
292 #[prost(string, tag = "1")]
293 pub name: ::prost::alloc::string::String,
294 #[prost(string, optional, tag = "2")]
295 pub description: ::core::option::Option<::prost::alloc::string::String>,
296 #[prost(int32, optional, tag = "3")]
297 pub count: ::core::option::Option<i32>,
298 #[prost(message, optional, tag = "4")]
299 pub candidate_assets: ::core::option::Option<CandidateAssetGroup>,
300 #[prost(string, repeated, tag = "5")]
301 pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
302}
303#[derive(Clone, PartialEq, ::prost::Message)]
304pub struct CandidateAssetGroup {
305 #[prost(oneof = "candidate_asset_group::CandidateAssetGroup", tags = "1, 2")]
306 pub candidate_asset_group: ::core::option::Option<
307 candidate_asset_group::CandidateAssetGroup,
308 >,
309}
310pub mod candidate_asset_group {
312 #[derive(Clone, PartialEq, ::prost::Oneof)]
313 pub enum CandidateAssetGroup {
314 #[prost(message, tag = "1")]
315 Sources(super::AssetSourceList),
316 #[prost(string, tag = "2")]
317 AssetGroupId(::prost::alloc::string::String),
318 }
319}
320#[derive(Clone, PartialEq, ::prost::Message)]
321pub struct AssetSourceList {
322 #[prost(message, repeated, tag = "1")]
323 pub sources: ::prost::alloc::vec::Vec<AssetSource>,
324}
325#[derive(Clone, PartialEq, ::prost::Message)]
326pub struct AssetGroup {
327 #[prost(string, tag = "1")]
328 pub id: ::prost::alloc::string::String,
329 #[prost(string, tag = "2")]
330 pub name: ::prost::alloc::string::String,
331 #[prost(string, optional, tag = "3")]
332 pub description: ::core::option::Option<::prost::alloc::string::String>,
333 #[prost(message, repeated, tag = "4")]
334 pub sources: ::prost::alloc::vec::Vec<AssetSource>,
335}
336#[derive(Clone, PartialEq, ::prost::Message)]
337pub struct AssetSource {
338 #[prost(oneof = "asset_source::AssetSource", tags = "1, 2")]
339 pub asset_source: ::core::option::Option<asset_source::AssetSource>,
340}
341pub mod asset_source {
343 #[derive(Clone, PartialEq, ::prost::Oneof)]
344 pub enum AssetSource {
345 #[prost(message, tag = "1")]
346 AssetSearch(super::super::super::asset::v2::SearchAssetsQuery),
347 #[prost(string, tag = "2")]
348 AssetRid(::prost::alloc::string::String),
349 }
350}
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct Segment {
353 #[prost(string, tag = "1")]
354 pub id: ::prost::alloc::string::String,
355 #[prost(string, tag = "2")]
356 pub name: ::prost::alloc::string::String,
357 #[prost(message, optional, tag = "3")]
358 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
359 #[prost(message, optional, tag = "4")]
360 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
361 #[prost(message, optional, tag = "5")]
362 pub status: ::core::option::Option<SegmentStatus>,
363}
364#[derive(Clone, Copy, PartialEq, ::prost::Message)]
365pub struct SegmentStatus {
366 #[prost(oneof = "segment_status::SegmentStatus", tags = "1, 2")]
367 pub segment_status: ::core::option::Option<segment_status::SegmentStatus>,
368}
369pub mod segment_status {
371 #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
372 pub enum SegmentStatus {
373 #[prost(message, tag = "1")]
374 Draft(super::DraftSegment),
375 #[prost(message, tag = "2")]
376 Finalized(super::FinalizedSegment),
377 }
378}
379#[derive(Clone, Copy, PartialEq, ::prost::Message)]
380pub struct DraftSegment {}
381#[derive(Clone, Copy, PartialEq, ::prost::Message)]
382pub struct FinalizedSegment {}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct CreatePlanRequest {
385 #[prost(message, optional, tag = "1")]
386 pub plan: ::core::option::Option<Plan>,
387 #[prost(string, tag = "2")]
388 pub message: ::prost::alloc::string::String,
389}
390#[derive(Clone, PartialEq, ::prost::Message)]
391pub struct CreatePlanResponse {
392 #[prost(message, optional, tag = "1")]
393 pub plan: ::core::option::Option<Plan>,
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct GetPlanRequest {
397 #[prost(string, tag = "1")]
398 pub plan_rid: ::prost::alloc::string::String,
399 #[prost(message, optional, tag = "2")]
400 pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct GetPlanResponse {
404 #[prost(message, optional, tag = "1")]
405 pub plan: ::core::option::Option<Plan>,
406}
407#[derive(Clone, PartialEq, ::prost::Message)]
408pub struct BatchGetPlansRequest {
409 #[prost(string, repeated, tag = "1")]
410 pub plan_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
411}
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct BatchGetPlansResponse {
414 #[prost(message, repeated, tag = "1")]
415 pub plans: ::prost::alloc::vec::Vec<Plan>,
416}
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct CreatePlanCommitRequest {
419 #[prost(string, tag = "1")]
420 pub plan_rid: ::prost::alloc::string::String,
421 #[prost(message, optional, tag = "2")]
422 pub content: ::core::option::Option<PlanContent>,
423 #[prost(string, optional, tag = "3")]
424 pub branch: ::core::option::Option<::prost::alloc::string::String>,
425 #[prost(string, tag = "4")]
426 pub message: ::prost::alloc::string::String,
427 #[prost(bool, tag = "5")]
428 pub is_working_state: bool,
429 #[prost(string, optional, tag = "6")]
430 pub expected_latest_commit: ::core::option::Option<::prost::alloc::string::String>,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct CreatePlanCommitResponse {
434 #[prost(message, optional, tag = "1")]
435 pub plan: ::core::option::Option<Plan>,
436}
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct UpdatePlanMetadataRequest {
439 #[prost(string, tag = "1")]
440 pub plan_rid: ::prost::alloc::string::String,
441 #[prost(string, optional, tag = "2")]
442 pub title: ::core::option::Option<::prost::alloc::string::String>,
443 #[prost(string, optional, tag = "3")]
444 pub description: ::core::option::Option<::prost::alloc::string::String>,
445 #[prost(message, optional, tag = "4")]
446 pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
447 #[prost(message, optional, tag = "5")]
448 pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
449 #[prost(bool, optional, tag = "6")]
450 pub is_archived: ::core::option::Option<bool>,
451 #[prost(bool, optional, tag = "7")]
452 pub is_published: ::core::option::Option<bool>,
453}
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct UpdatePlanMetadataResponse {
456 #[prost(message, optional, tag = "1")]
457 pub metadata: ::core::option::Option<PlanMetadata>,
458}
459#[derive(Clone, PartialEq, ::prost::Message)]
460pub struct SearchPlansQuery {
461 #[prost(
462 oneof = "search_plans_query::Query",
463 tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
464 )]
465 pub query: ::core::option::Option<search_plans_query::Query>,
466}
467pub mod search_plans_query {
469 #[derive(Clone, PartialEq, ::prost::Oneof)]
470 pub enum Query {
471 #[prost(message, tag = "1")]
472 And(super::SearchPlansQueryList),
473 #[prost(message, tag = "2")]
474 Or(super::SearchPlansQueryList),
475 #[prost(message, tag = "3")]
476 Not(::prost::alloc::boxed::Box<super::SearchPlansQuery>),
477 #[prost(string, tag = "4")]
478 ExactMatch(::prost::alloc::string::String),
479 #[prost(string, tag = "5")]
480 SearchText(::prost::alloc::string::String),
481 #[prost(message, tag = "6")]
482 Labels(super::super::super::types::LabelsFilter),
483 #[prost(message, tag = "7")]
484 Properties(super::super::super::types::PropertiesFilter),
485 #[prost(string, tag = "8")]
486 CreatedBy(::prost::alloc::string::String),
487 #[prost(bool, tag = "9")]
488 IsArchived(bool),
489 #[prost(bool, tag = "10")]
490 IsPublished(bool),
491 #[prost(bool, tag = "11")]
492 AuthorIsCurrentUser(bool),
493 #[prost(message, tag = "12")]
494 AuthorRids(super::UserRidList),
495 #[prost(string, tag = "13")]
496 WorkspaceRid(::prost::alloc::string::String),
497 #[prost(message, tag = "14")]
498 DateRangeOverlaps(super::PlanDateRangeFilter),
499 }
500}
501#[derive(Clone, Copy, PartialEq, ::prost::Message)]
502pub struct PlanDateRangeFilter {
503 #[prost(message, optional, tag = "1")]
504 pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
505 #[prost(message, optional, tag = "2")]
506 pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
507}
508#[derive(Clone, PartialEq, ::prost::Message)]
509pub struct SearchPlansQueryList {
510 #[prost(message, repeated, tag = "1")]
511 pub queries: ::prost::alloc::vec::Vec<SearchPlansQuery>,
512}
513#[derive(Clone, PartialEq, ::prost::Message)]
514pub struct UserRidList {
515 #[prost(string, repeated, tag = "1")]
516 pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
517}
518#[derive(Clone, Copy, PartialEq, ::prost::Message)]
519pub struct PlanSortOptions {
520 #[prost(enumeration = "PlanSortField", tag = "1")]
521 pub field: i32,
522 #[prost(bool, tag = "2")]
523 pub is_descending: bool,
524}
525#[derive(Clone, PartialEq, ::prost::Message)]
526pub struct SearchPlansRequest {
527 #[prost(message, optional, tag = "1")]
528 pub query: ::core::option::Option<SearchPlansQuery>,
529 #[prost(message, optional, tag = "2")]
530 pub sort: ::core::option::Option<PlanSortOptions>,
531 #[prost(string, optional, tag = "3")]
532 pub page_token: ::core::option::Option<::prost::alloc::string::String>,
533 #[prost(int32, optional, tag = "4")]
534 pub page_size: ::core::option::Option<i32>,
535}
536#[derive(Clone, PartialEq, ::prost::Message)]
537pub struct SearchPlansResponse {
538 #[prost(message, repeated, tag = "1")]
539 pub results: ::prost::alloc::vec::Vec<PlanSummary>,
540 #[prost(string, optional, tag = "2")]
541 pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
542}
543#[derive(Clone, PartialEq, ::prost::Message)]
544pub struct ValidatePlanRequest {
545 #[prost(oneof = "validate_plan_request::Source", tags = "1, 2")]
546 pub source: ::core::option::Option<validate_plan_request::Source>,
547}
548pub mod validate_plan_request {
550 #[derive(Clone, PartialEq, ::prost::Oneof)]
551 pub enum Source {
552 #[prost(message, tag = "1")]
553 Plan(super::StoredPlanRevision),
554 #[prost(message, tag = "2")]
555 Content(super::PlanContent),
556 }
557}
558#[derive(Clone, PartialEq, ::prost::Message)]
559pub struct StoredPlanRevision {
560 #[prost(string, tag = "1")]
561 pub plan_rid: ::prost::alloc::string::String,
562 #[prost(message, optional, tag = "2")]
563 pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
564}
565#[derive(Clone, PartialEq, ::prost::Message)]
566pub struct ValidatePlanResponse {
567 #[prost(message, repeated, tag = "1")]
568 pub violations: ::prost::alloc::vec::Vec<PlanViolation>,
569 #[prost(bool, tag = "2")]
570 pub is_truncated: bool,
571 #[prost(message, optional, tag = "3")]
572 pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
573}
574#[derive(Clone, PartialEq, ::prost::Message)]
575pub struct PlanViolation {
576 #[prost(enumeration = "PlanViolationSeverity", tag = "1")]
577 pub severity: i32,
578 #[prost(string, tag = "2")]
579 pub code: ::prost::alloc::string::String,
580 #[prost(string, tag = "3")]
581 pub message: ::prost::alloc::string::String,
582 #[prost(message, repeated, tag = "4")]
583 pub subjects: ::prost::alloc::vec::Vec<PlanViolationSubject>,
584}
585#[derive(Clone, PartialEq, ::prost::Message)]
586pub struct PlanViolationSubject {
587 #[prost(enumeration = "PlanElementKind", tag = "1")]
588 pub kind: i32,
589 #[prost(string, tag = "2")]
590 pub id: ::prost::alloc::string::String,
591 #[prost(string, tag = "3")]
592 pub path: ::prost::alloc::string::String,
593}
594#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
595#[repr(i32)]
596pub enum PlanSortField {
597 Unspecified = 0,
598 Name = 1,
599 CreatedAt = 2,
600 EditedAt = 3,
601 StartDate = 4,
602 EndDate = 5,
603}
604impl PlanSortField {
605 pub fn as_str_name(&self) -> &'static str {
610 match self {
611 Self::Unspecified => "PLAN_SORT_FIELD_UNSPECIFIED",
612 Self::Name => "NAME",
613 Self::CreatedAt => "CREATED_AT",
614 Self::EditedAt => "EDITED_AT",
615 Self::StartDate => "START_DATE",
616 Self::EndDate => "END_DATE",
617 }
618 }
619 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
621 match value {
622 "PLAN_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
623 "NAME" => Some(Self::Name),
624 "CREATED_AT" => Some(Self::CreatedAt),
625 "EDITED_AT" => Some(Self::EditedAt),
626 "START_DATE" => Some(Self::StartDate),
627 "END_DATE" => Some(Self::EndDate),
628 _ => None,
629 }
630 }
631}
632#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
633#[repr(i32)]
634pub enum PlanViolationSeverity {
635 Unspecified = 0,
636 Error = 1,
637 Warning = 2,
638}
639impl PlanViolationSeverity {
640 pub fn as_str_name(&self) -> &'static str {
645 match self {
646 Self::Unspecified => "PLAN_VIOLATION_SEVERITY_UNSPECIFIED",
647 Self::Error => "PLAN_VIOLATION_SEVERITY_ERROR",
648 Self::Warning => "PLAN_VIOLATION_SEVERITY_WARNING",
649 }
650 }
651 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
653 match value {
654 "PLAN_VIOLATION_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
655 "PLAN_VIOLATION_SEVERITY_ERROR" => Some(Self::Error),
656 "PLAN_VIOLATION_SEVERITY_WARNING" => Some(Self::Warning),
657 _ => None,
658 }
659 }
660}
661#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
662#[repr(i32)]
663pub enum PlanElementKind {
664 Unspecified = 0,
665 Plan = 1,
666 Objective = 2,
667 Activity = 3,
668 Segment = 4,
669 Milestone = 5,
670 AssetGroup = 6,
671}
672impl PlanElementKind {
673 pub fn as_str_name(&self) -> &'static str {
678 match self {
679 Self::Unspecified => "PLAN_ELEMENT_KIND_UNSPECIFIED",
680 Self::Plan => "PLAN_ELEMENT_KIND_PLAN",
681 Self::Objective => "PLAN_ELEMENT_KIND_OBJECTIVE",
682 Self::Activity => "PLAN_ELEMENT_KIND_ACTIVITY",
683 Self::Segment => "PLAN_ELEMENT_KIND_SEGMENT",
684 Self::Milestone => "PLAN_ELEMENT_KIND_MILESTONE",
685 Self::AssetGroup => "PLAN_ELEMENT_KIND_ASSET_GROUP",
686 }
687 }
688 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
690 match value {
691 "PLAN_ELEMENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
692 "PLAN_ELEMENT_KIND_PLAN" => Some(Self::Plan),
693 "PLAN_ELEMENT_KIND_OBJECTIVE" => Some(Self::Objective),
694 "PLAN_ELEMENT_KIND_ACTIVITY" => Some(Self::Activity),
695 "PLAN_ELEMENT_KIND_SEGMENT" => Some(Self::Segment),
696 "PLAN_ELEMENT_KIND_MILESTONE" => Some(Self::Milestone),
697 "PLAN_ELEMENT_KIND_ASSET_GROUP" => Some(Self::AssetGroup),
698 _ => None,
699 }
700 }
701}
702#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
703#[repr(i32)]
704pub enum PlanError {
705 PlanNotFound = 0,
706 BranchOrCommitNotFound = 1,
707 CommitConflict = 2,
708 PlanArchived = 3,
709}
710impl PlanError {
711 pub fn as_str_name(&self) -> &'static str {
716 match self {
717 Self::PlanNotFound => "PLAN_ERROR_PLAN_NOT_FOUND",
718 Self::BranchOrCommitNotFound => "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND",
719 Self::CommitConflict => "PLAN_ERROR_COMMIT_CONFLICT",
720 Self::PlanArchived => "PLAN_ERROR_PLAN_ARCHIVED",
721 }
722 }
723 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
725 match value {
726 "PLAN_ERROR_PLAN_NOT_FOUND" => Some(Self::PlanNotFound),
727 "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND" => Some(Self::BranchOrCommitNotFound),
728 "PLAN_ERROR_COMMIT_CONFLICT" => Some(Self::CommitConflict),
729 "PLAN_ERROR_PLAN_ARCHIVED" => Some(Self::PlanArchived),
730 _ => None,
731 }
732 }
733}
734pub mod plan_service_client {
736 #![allow(
737 unused_variables,
738 dead_code,
739 missing_docs,
740 clippy::wildcard_imports,
741 clippy::let_unit_value,
742 )]
743 use tonic::codegen::*;
744 use tonic::codegen::http::Uri;
745 #[derive(Debug, Clone)]
746 pub struct PlanServiceClient<T> {
747 inner: tonic::client::Grpc<T>,
748 }
749 impl PlanServiceClient<tonic::transport::Channel> {
750 pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
752 where
753 D: TryInto<tonic::transport::Endpoint>,
754 D::Error: Into<StdError>,
755 {
756 let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
757 Ok(Self::new(conn))
758 }
759 }
760 impl<T> PlanServiceClient<T>
761 where
762 T: tonic::client::GrpcService<tonic::body::Body>,
763 T::Error: Into<StdError>,
764 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
765 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
766 {
767 pub fn new(inner: T) -> Self {
768 let inner = tonic::client::Grpc::new(inner);
769 Self { inner }
770 }
771 pub fn with_origin(inner: T, origin: Uri) -> Self {
772 let inner = tonic::client::Grpc::with_origin(inner, origin);
773 Self { inner }
774 }
775 pub fn with_interceptor<F>(
776 inner: T,
777 interceptor: F,
778 ) -> PlanServiceClient<InterceptedService<T, F>>
779 where
780 F: tonic::service::Interceptor,
781 T::ResponseBody: Default,
782 T: tonic::codegen::Service<
783 http::Request<tonic::body::Body>,
784 Response = http::Response<
785 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
786 >,
787 >,
788 <T as tonic::codegen::Service<
789 http::Request<tonic::body::Body>,
790 >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
791 {
792 PlanServiceClient::new(InterceptedService::new(inner, interceptor))
793 }
794 #[must_use]
799 pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
800 self.inner = self.inner.send_compressed(encoding);
801 self
802 }
803 #[must_use]
805 pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
806 self.inner = self.inner.accept_compressed(encoding);
807 self
808 }
809 #[must_use]
813 pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
814 self.inner = self.inner.max_decoding_message_size(limit);
815 self
816 }
817 #[must_use]
821 pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
822 self.inner = self.inner.max_encoding_message_size(limit);
823 self
824 }
825 pub async fn create_plan(
826 &mut self,
827 request: impl tonic::IntoRequest<super::CreatePlanRequest>,
828 ) -> std::result::Result<
829 tonic::Response<super::CreatePlanResponse>,
830 tonic::Status,
831 > {
832 self.inner
833 .ready()
834 .await
835 .map_err(|e| {
836 tonic::Status::unknown(
837 format!("Service was not ready: {}", e.into()),
838 )
839 })?;
840 let codec = tonic::codec::ProstCodec::default();
841 let path = http::uri::PathAndQuery::from_static(
842 "/nominal.plan.v1.PlanService/CreatePlan",
843 );
844 let mut req = request.into_request();
845 req.extensions_mut()
846 .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlan"));
847 self.inner.unary(req, path, codec).await
848 }
849 pub async fn get_plan(
850 &mut self,
851 request: impl tonic::IntoRequest<super::GetPlanRequest>,
852 ) -> std::result::Result<
853 tonic::Response<super::GetPlanResponse>,
854 tonic::Status,
855 > {
856 self.inner
857 .ready()
858 .await
859 .map_err(|e| {
860 tonic::Status::unknown(
861 format!("Service was not ready: {}", e.into()),
862 )
863 })?;
864 let codec = tonic::codec::ProstCodec::default();
865 let path = http::uri::PathAndQuery::from_static(
866 "/nominal.plan.v1.PlanService/GetPlan",
867 );
868 let mut req = request.into_request();
869 req.extensions_mut()
870 .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "GetPlan"));
871 self.inner.unary(req, path, codec).await
872 }
873 pub async fn batch_get_plans(
874 &mut self,
875 request: impl tonic::IntoRequest<super::BatchGetPlansRequest>,
876 ) -> std::result::Result<
877 tonic::Response<super::BatchGetPlansResponse>,
878 tonic::Status,
879 > {
880 self.inner
881 .ready()
882 .await
883 .map_err(|e| {
884 tonic::Status::unknown(
885 format!("Service was not ready: {}", e.into()),
886 )
887 })?;
888 let codec = tonic::codec::ProstCodec::default();
889 let path = http::uri::PathAndQuery::from_static(
890 "/nominal.plan.v1.PlanService/BatchGetPlans",
891 );
892 let mut req = request.into_request();
893 req.extensions_mut()
894 .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "BatchGetPlans"));
895 self.inner.unary(req, path, codec).await
896 }
897 pub async fn create_plan_commit(
898 &mut self,
899 request: impl tonic::IntoRequest<super::CreatePlanCommitRequest>,
900 ) -> std::result::Result<
901 tonic::Response<super::CreatePlanCommitResponse>,
902 tonic::Status,
903 > {
904 self.inner
905 .ready()
906 .await
907 .map_err(|e| {
908 tonic::Status::unknown(
909 format!("Service was not ready: {}", e.into()),
910 )
911 })?;
912 let codec = tonic::codec::ProstCodec::default();
913 let path = http::uri::PathAndQuery::from_static(
914 "/nominal.plan.v1.PlanService/CreatePlanCommit",
915 );
916 let mut req = request.into_request();
917 req.extensions_mut()
918 .insert(
919 GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlanCommit"),
920 );
921 self.inner.unary(req, path, codec).await
922 }
923 pub async fn update_plan_metadata(
924 &mut self,
925 request: impl tonic::IntoRequest<super::UpdatePlanMetadataRequest>,
926 ) -> std::result::Result<
927 tonic::Response<super::UpdatePlanMetadataResponse>,
928 tonic::Status,
929 > {
930 self.inner
931 .ready()
932 .await
933 .map_err(|e| {
934 tonic::Status::unknown(
935 format!("Service was not ready: {}", e.into()),
936 )
937 })?;
938 let codec = tonic::codec::ProstCodec::default();
939 let path = http::uri::PathAndQuery::from_static(
940 "/nominal.plan.v1.PlanService/UpdatePlanMetadata",
941 );
942 let mut req = request.into_request();
943 req.extensions_mut()
944 .insert(
945 GrpcMethod::new("nominal.plan.v1.PlanService", "UpdatePlanMetadata"),
946 );
947 self.inner.unary(req, path, codec).await
948 }
949 pub async fn search_plans(
950 &mut self,
951 request: impl tonic::IntoRequest<super::SearchPlansRequest>,
952 ) -> std::result::Result<
953 tonic::Response<super::SearchPlansResponse>,
954 tonic::Status,
955 > {
956 self.inner
957 .ready()
958 .await
959 .map_err(|e| {
960 tonic::Status::unknown(
961 format!("Service was not ready: {}", e.into()),
962 )
963 })?;
964 let codec = tonic::codec::ProstCodec::default();
965 let path = http::uri::PathAndQuery::from_static(
966 "/nominal.plan.v1.PlanService/SearchPlans",
967 );
968 let mut req = request.into_request();
969 req.extensions_mut()
970 .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "SearchPlans"));
971 self.inner.unary(req, path, codec).await
972 }
973 pub async fn validate_plan(
974 &mut self,
975 request: impl tonic::IntoRequest<super::ValidatePlanRequest>,
976 ) -> std::result::Result<
977 tonic::Response<super::ValidatePlanResponse>,
978 tonic::Status,
979 > {
980 self.inner
981 .ready()
982 .await
983 .map_err(|e| {
984 tonic::Status::unknown(
985 format!("Service was not ready: {}", e.into()),
986 )
987 })?;
988 let codec = tonic::codec::ProstCodec::default();
989 let path = http::uri::PathAndQuery::from_static(
990 "/nominal.plan.v1.PlanService/ValidatePlan",
991 );
992 let mut req = request.into_request();
993 req.extensions_mut()
994 .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "ValidatePlan"));
995 self.inner.unary(req, path, codec).await
996 }
997 }
998}