Skip to main content

nominal_api_proto/proto/
nominal.plan.v1.rs

1// This file is @generated by prost-build.
2#[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    #[prost(message, optional, tag = "13")]
68    pub status: ::core::option::Option<PlanStatus>,
69}
70#[derive(Clone, Copy, PartialEq, ::prost::Message)]
71pub struct PlanStatus {
72    #[prost(oneof = "plan_status::PlanStatus", tags = "1, 2, 3")]
73    pub plan_status: ::core::option::Option<plan_status::PlanStatus>,
74}
75/// Nested message and enum types in `PlanStatus`.
76pub mod plan_status {
77    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
78    pub enum PlanStatus {
79        #[prost(message, tag = "1")]
80        Open(super::OpenPlan),
81        #[prost(message, tag = "2")]
82        Completed(super::CompletedPlan),
83        #[prost(message, tag = "3")]
84        Cancelled(super::CancelledPlan),
85    }
86}
87#[derive(Clone, Copy, PartialEq, ::prost::Message)]
88pub struct OpenPlan {}
89#[derive(Clone, Copy, PartialEq, ::prost::Message)]
90pub struct CompletedPlan {}
91#[derive(Clone, Copy, PartialEq, ::prost::Message)]
92pub struct CancelledPlan {}
93#[derive(Clone, PartialEq, ::prost::Message)]
94pub struct PlanContent {
95    #[prost(oneof = "plan_content::PlanContent", tags = "1")]
96    pub plan_content: ::core::option::Option<plan_content::PlanContent>,
97}
98/// Nested message and enum types in `PlanContent`.
99pub mod plan_content {
100    #[derive(Clone, PartialEq, ::prost::Oneof)]
101    pub enum PlanContent {
102        #[prost(message, tag = "1")]
103        V1(super::PlanContentV1),
104    }
105}
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct PlanContentV1 {
108    #[prost(message, optional, tag = "1")]
109    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
110    #[prost(message, optional, tag = "2")]
111    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
112    #[prost(message, repeated, tag = "3")]
113    pub objectives: ::prost::alloc::vec::Vec<Objective>,
114    #[prost(message, repeated, tag = "4")]
115    pub activities: ::prost::alloc::vec::Vec<Activity>,
116    #[prost(message, repeated, tag = "5")]
117    pub segments: ::prost::alloc::vec::Vec<Segment>,
118    #[prost(message, repeated, tag = "6")]
119    pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
120    #[prost(message, repeated, tag = "7")]
121    pub milestones: ::prost::alloc::vec::Vec<Milestone>,
122    #[prost(message, repeated, tag = "8")]
123    pub constraints: ::prost::alloc::vec::Vec<Constraint>,
124    #[prost(string, optional, tag = "9")]
125    pub timezone: ::core::option::Option<::prost::alloc::string::String>,
126    #[prost(message, optional, tag = "10")]
127    pub base_asset_pool: ::core::option::Option<AssetGroup>,
128}
129#[derive(Clone, PartialEq, ::prost::Message)]
130pub struct Milestone {
131    #[prost(string, tag = "1")]
132    pub id: ::prost::alloc::string::String,
133    #[prost(string, tag = "2")]
134    pub name: ::prost::alloc::string::String,
135    #[prost(string, optional, tag = "3")]
136    pub description: ::core::option::Option<::prost::alloc::string::String>,
137}
138#[derive(Clone, PartialEq, ::prost::Message)]
139pub struct Activity {
140    #[prost(string, tag = "1")]
141    pub id: ::prost::alloc::string::String,
142    #[prost(string, tag = "2")]
143    pub name: ::prost::alloc::string::String,
144    #[prost(string, optional, tag = "3")]
145    pub description: ::core::option::Option<::prost::alloc::string::String>,
146    #[prost(message, optional, tag = "4")]
147    pub details: ::core::option::Option<ActivityDetails>,
148    #[prost(message, optional, tag = "5")]
149    pub planned_duration: ::core::option::Option<MinuteDuration>,
150    #[prost(string, repeated, tag = "6")]
151    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
152    #[prost(map = "string, string", tag = "7")]
153    pub properties: ::std::collections::HashMap<
154        ::prost::alloc::string::String,
155        ::prost::alloc::string::String,
156    >,
157    #[prost(string, repeated, tag = "8")]
158    pub attachment_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
159    #[prost(message, repeated, tag = "9")]
160    pub links: ::prost::alloc::vec::Vec<Link>,
161}
162#[derive(Clone, PartialEq, ::prost::Message)]
163pub struct ActivityDetails {
164    #[prost(oneof = "activity_details::ActivityDetails", tags = "1")]
165    pub activity_details: ::core::option::Option<activity_details::ActivityDetails>,
166}
167/// Nested message and enum types in `ActivityDetails`.
168pub mod activity_details {
169    #[derive(Clone, PartialEq, ::prost::Oneof)]
170    pub enum ActivityDetails {
171        #[prost(message, tag = "1")]
172        Single(super::SingleActivity),
173    }
174}
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct SingleActivity {
177    #[prost(message, optional, tag = "1")]
178    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
179    #[prost(message, optional, tag = "2")]
180    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
181    #[prost(string, optional, tag = "3")]
182    pub segment_id: ::core::option::Option<::prost::alloc::string::String>,
183    #[prost(string, repeated, tag = "4")]
184    pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
185    #[prost(message, optional, tag = "5")]
186    pub status: ::core::option::Option<ActivityStatus>,
187    #[prost(message, repeated, tag = "7")]
188    pub asset_assignments: ::prost::alloc::vec::Vec<AssetAssignment>,
189}
190#[derive(Clone, PartialEq, ::prost::Message)]
191pub struct AssetAssignment {
192    #[prost(string, tag = "1")]
193    pub asset_rid: ::prost::alloc::string::String,
194    #[prost(string, repeated, tag = "2")]
195    pub resource_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
196}
197#[derive(Clone, PartialEq, ::prost::Message)]
198pub struct ActivityStatus {
199    #[prost(oneof = "activity_status::ActivityStatus", tags = "1, 2, 3, 4, 5")]
200    pub activity_status: ::core::option::Option<activity_status::ActivityStatus>,
201}
202/// Nested message and enum types in `ActivityStatus`.
203pub mod activity_status {
204    #[derive(Clone, PartialEq, ::prost::Oneof)]
205    pub enum ActivityStatus {
206        #[prost(message, tag = "1")]
207        Created(super::CreatedActivity),
208        #[prost(message, tag = "2")]
209        Finalized(super::FinalizedActivity),
210        #[prost(message, tag = "3")]
211        InProgress(super::InProgressActivity),
212        #[prost(message, tag = "4")]
213        Completed(super::CompletedActivity),
214        #[prost(message, tag = "5")]
215        Cancelled(super::CancelledActivity),
216    }
217}
218#[derive(Clone, Copy, PartialEq, ::prost::Message)]
219pub struct CreatedActivity {}
220#[derive(Clone, Copy, PartialEq, ::prost::Message)]
221pub struct FinalizedActivity {}
222#[derive(Clone, Copy, PartialEq, ::prost::Message)]
223pub struct InProgressActivity {}
224#[derive(Clone, PartialEq, ::prost::Message)]
225pub struct CompletedActivity {
226    #[prost(string, optional, tag = "1")]
227    pub notes: ::core::option::Option<::prost::alloc::string::String>,
228}
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct CancelledActivity {
231    #[prost(string, tag = "1")]
232    pub reason: ::prost::alloc::string::String,
233    #[prost(string, optional, tag = "2")]
234    pub notes: ::core::option::Option<::prost::alloc::string::String>,
235}
236#[derive(Clone, PartialEq, ::prost::Message)]
237pub struct Objective {
238    #[prost(string, tag = "1")]
239    pub id: ::prost::alloc::string::String,
240    #[prost(string, tag = "2")]
241    pub name: ::prost::alloc::string::String,
242    #[prost(string, tag = "3")]
243    pub creator: ::prost::alloc::string::String,
244    #[prost(message, optional, tag = "4")]
245    pub created_at: ::core::option::Option<
246        super::super::super::google::protobuf::Timestamp,
247    >,
248    #[prost(enumeration = "super::super::types::Priority", tag = "5")]
249    pub priority: i32,
250    #[prost(string, repeated, tag = "6")]
251    pub milestone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
252    #[prost(string, optional, tag = "7")]
253    pub description: ::core::option::Option<::prost::alloc::string::String>,
254    #[prost(message, optional, tag = "8")]
255    pub details: ::core::option::Option<ObjectiveDetails>,
256    #[prost(message, optional, tag = "9")]
257    pub status: ::core::option::Option<ObjectiveStatus>,
258    #[prost(message, optional, tag = "10")]
259    pub planned_duration: ::core::option::Option<MinuteDuration>,
260    #[prost(string, repeated, tag = "11")]
261    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
262    #[prost(map = "string, string", tag = "12")]
263    pub properties: ::std::collections::HashMap<
264        ::prost::alloc::string::String,
265        ::prost::alloc::string::String,
266    >,
267    #[prost(string, repeated, tag = "13")]
268    pub attachment_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
269    #[prost(message, repeated, tag = "14")]
270    pub links: ::prost::alloc::vec::Vec<Link>,
271}
272#[derive(Clone, PartialEq, ::prost::Message)]
273pub struct ObjectiveStatus {
274    #[prost(oneof = "objective_status::ObjectiveStatus", tags = "1, 2, 3, 4, 5")]
275    pub objective_status: ::core::option::Option<objective_status::ObjectiveStatus>,
276}
277/// Nested message and enum types in `ObjectiveStatus`.
278pub mod objective_status {
279    #[derive(Clone, PartialEq, ::prost::Oneof)]
280    pub enum ObjectiveStatus {
281        #[prost(message, tag = "1")]
282        Draft(super::DraftObjective),
283        #[prost(message, tag = "2")]
284        Proposed(super::ProposedObjective),
285        #[prost(message, tag = "3")]
286        Finalized(super::FinalizedObjective),
287        #[prost(message, tag = "4")]
288        Completed(super::CompletedObjective),
289        #[prost(message, tag = "5")]
290        Rejected(super::RejectedObjective),
291    }
292}
293#[derive(Clone, Copy, PartialEq, ::prost::Message)]
294pub struct DraftObjective {}
295#[derive(Clone, Copy, PartialEq, ::prost::Message)]
296pub struct ProposedObjective {}
297#[derive(Clone, Copy, PartialEq, ::prost::Message)]
298pub struct FinalizedObjective {}
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct CompletedObjective {
301    #[prost(message, optional, tag = "1")]
302    pub disposition: ::core::option::Option<ObjectiveDisposition>,
303}
304#[derive(Clone, PartialEq, ::prost::Message)]
305pub struct RejectedObjective {
306    #[prost(string, tag = "1")]
307    pub reason: ::prost::alloc::string::String,
308}
309#[derive(Clone, PartialEq, ::prost::Message)]
310pub struct ObjectiveDisposition {
311    #[prost(oneof = "objective_disposition::ObjectiveDisposition", tags = "1, 2")]
312    pub objective_disposition: ::core::option::Option<
313        objective_disposition::ObjectiveDisposition,
314    >,
315}
316/// Nested message and enum types in `ObjectiveDisposition`.
317pub mod objective_disposition {
318    #[derive(Clone, PartialEq, ::prost::Oneof)]
319    pub enum ObjectiveDisposition {
320        #[prost(message, tag = "1")]
321        Successful(super::SuccessfulObjective),
322        #[prost(message, tag = "2")]
323        Failed(super::FailedObjective),
324    }
325}
326#[derive(Clone, PartialEq, ::prost::Message)]
327pub struct SuccessfulObjective {
328    #[prost(string, optional, tag = "1")]
329    pub notes: ::core::option::Option<::prost::alloc::string::String>,
330}
331#[derive(Clone, PartialEq, ::prost::Message)]
332pub struct FailedObjective {
333    #[prost(string, tag = "1")]
334    pub reason: ::prost::alloc::string::String,
335    #[prost(string, optional, tag = "2")]
336    pub notes: ::core::option::Option<::prost::alloc::string::String>,
337}
338#[derive(Clone, PartialEq, ::prost::Message)]
339pub struct ObjectiveDetails {
340    #[prost(oneof = "objective_details::ObjectiveDetails", tags = "1")]
341    pub objective_details: ::core::option::Option<objective_details::ObjectiveDetails>,
342}
343/// Nested message and enum types in `ObjectiveDetails`.
344pub mod objective_details {
345    #[derive(Clone, PartialEq, ::prost::Oneof)]
346    pub enum ObjectiveDetails {
347        #[prost(message, tag = "1")]
348        Simple(super::SimpleObjective),
349    }
350}
351#[derive(Clone, PartialEq, ::prost::Message)]
352pub struct SimpleObjective {
353    #[prost(message, repeated, tag = "1")]
354    pub resources: ::prost::alloc::vec::Vec<Resource>,
355    #[prost(string, repeated, tag = "2")]
356    pub checklist_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
357    #[prost(string, repeated, tag = "3")]
358    pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
359}
360#[derive(Clone, PartialEq, ::prost::Message)]
361pub struct Resource {
362    #[prost(string, tag = "1")]
363    pub name: ::prost::alloc::string::String,
364    #[prost(string, optional, tag = "2")]
365    pub description: ::core::option::Option<::prost::alloc::string::String>,
366    #[prost(int32, optional, tag = "3")]
367    pub count: ::core::option::Option<i32>,
368    #[prost(message, optional, tag = "4")]
369    pub candidate_assets: ::core::option::Option<CandidateAssetGroup>,
370    #[prost(string, tag = "6")]
371    pub id: ::prost::alloc::string::String,
372    #[prost(string, repeated, tag = "7")]
373    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
374    #[prost(map = "string, string", tag = "8")]
375    pub properties: ::std::collections::HashMap<
376        ::prost::alloc::string::String,
377        ::prost::alloc::string::String,
378    >,
379}
380#[derive(Clone, PartialEq, ::prost::Message)]
381pub struct CandidateAssetGroup {
382    #[prost(oneof = "candidate_asset_group::CandidateAssetGroup", tags = "1, 2")]
383    pub candidate_asset_group: ::core::option::Option<
384        candidate_asset_group::CandidateAssetGroup,
385    >,
386}
387/// Nested message and enum types in `CandidateAssetGroup`.
388pub mod candidate_asset_group {
389    #[derive(Clone, PartialEq, ::prost::Oneof)]
390    pub enum CandidateAssetGroup {
391        #[prost(message, tag = "1")]
392        Sources(super::AssetSourceList),
393        #[prost(string, tag = "2")]
394        AssetGroupId(::prost::alloc::string::String),
395    }
396}
397#[derive(Clone, PartialEq, ::prost::Message)]
398pub struct AssetSourceList {
399    #[prost(message, repeated, tag = "1")]
400    pub sources: ::prost::alloc::vec::Vec<AssetSource>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct AssetGroup {
404    #[prost(string, tag = "1")]
405    pub id: ::prost::alloc::string::String,
406    #[prost(string, tag = "2")]
407    pub name: ::prost::alloc::string::String,
408    #[prost(string, optional, tag = "3")]
409    pub description: ::core::option::Option<::prost::alloc::string::String>,
410    #[prost(message, repeated, tag = "4")]
411    pub sources: ::prost::alloc::vec::Vec<AssetSource>,
412    #[prost(bool, tag = "5")]
413    pub is_exempt_from_base_pool: bool,
414}
415#[derive(Clone, PartialEq, ::prost::Message)]
416pub struct AssetSource {
417    #[prost(oneof = "asset_source::AssetSource", tags = "1, 2")]
418    pub asset_source: ::core::option::Option<asset_source::AssetSource>,
419}
420/// Nested message and enum types in `AssetSource`.
421pub mod asset_source {
422    #[derive(Clone, PartialEq, ::prost::Oneof)]
423    pub enum AssetSource {
424        #[prost(message, tag = "1")]
425        AssetSearch(super::super::super::asset::v2::SearchAssetsQuery),
426        #[prost(string, tag = "2")]
427        AssetRid(::prost::alloc::string::String),
428    }
429}
430#[derive(Clone, PartialEq, ::prost::Message)]
431pub struct Segment {
432    #[prost(string, tag = "1")]
433    pub id: ::prost::alloc::string::String,
434    #[prost(string, tag = "2")]
435    pub name: ::prost::alloc::string::String,
436    #[prost(message, optional, tag = "3")]
437    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
438    #[prost(message, optional, tag = "4")]
439    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
440    #[prost(message, optional, tag = "5")]
441    pub status: ::core::option::Option<SegmentStatus>,
442    #[prost(string, repeated, tag = "6")]
443    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
444    #[prost(map = "string, string", tag = "7")]
445    pub properties: ::std::collections::HashMap<
446        ::prost::alloc::string::String,
447        ::prost::alloc::string::String,
448    >,
449}
450#[derive(Clone, Copy, PartialEq, ::prost::Message)]
451pub struct SegmentStatus {
452    #[prost(oneof = "segment_status::SegmentStatus", tags = "1, 2")]
453    pub segment_status: ::core::option::Option<segment_status::SegmentStatus>,
454}
455/// Nested message and enum types in `SegmentStatus`.
456pub mod segment_status {
457    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
458    pub enum SegmentStatus {
459        #[prost(message, tag = "1")]
460        Draft(super::DraftSegment),
461        #[prost(message, tag = "2")]
462        Finalized(super::FinalizedSegment),
463    }
464}
465#[derive(Clone, Copy, PartialEq, ::prost::Message)]
466pub struct DraftSegment {}
467#[derive(Clone, Copy, PartialEq, ::prost::Message)]
468pub struct FinalizedSegment {}
469#[derive(Clone, PartialEq, ::prost::Message)]
470pub struct Link {
471    #[prost(string, optional, tag = "1")]
472    pub title: ::core::option::Option<::prost::alloc::string::String>,
473    #[prost(string, tag = "2")]
474    pub url: ::prost::alloc::string::String,
475}
476#[derive(Clone, Copy, PartialEq, ::prost::Message)]
477pub struct MinuteDuration {
478    #[prost(message, optional, tag = "1")]
479    pub value: ::core::option::Option<super::super::types::Duration>,
480}
481#[derive(Clone, PartialEq, ::prost::Message)]
482pub struct Constraint {
483    #[prost(string, tag = "1")]
484    pub id: ::prost::alloc::string::String,
485    #[prost(string, tag = "2")]
486    pub name: ::prost::alloc::string::String,
487    #[prost(message, repeated, tag = "3")]
488    pub subjects: ::prost::alloc::vec::Vec<ConstraintSubject>,
489    #[prost(message, optional, tag = "4")]
490    pub kind: ::core::option::Option<ConstraintKind>,
491}
492#[derive(Clone, PartialEq, ::prost::Message)]
493pub struct ConstraintSubject {
494    #[prost(oneof = "constraint_subject::Subject", tags = "1, 2, 3, 4, 5, 6, 7")]
495    pub subject: ::core::option::Option<constraint_subject::Subject>,
496}
497/// Nested message and enum types in `ConstraintSubject`.
498pub mod constraint_subject {
499    #[derive(Clone, PartialEq, ::prost::Oneof)]
500    pub enum Subject {
501        #[prost(string, tag = "1")]
502        ActivityId(::prost::alloc::string::String),
503        #[prost(string, tag = "2")]
504        ObjectiveId(::prost::alloc::string::String),
505        #[prost(string, tag = "3")]
506        ResourceId(::prost::alloc::string::String),
507        #[prost(string, tag = "4")]
508        AssetGroupId(::prost::alloc::string::String),
509        #[prost(string, tag = "5")]
510        AssetRid(::prost::alloc::string::String),
511        #[prost(message, tag = "6")]
512        PlanWide(super::PlanWide),
513        #[prost(string, tag = "7")]
514        SegmentId(::prost::alloc::string::String),
515    }
516}
517#[derive(Clone, Copy, PartialEq, ::prost::Message)]
518pub struct PlanWide {}
519#[derive(Clone, PartialEq, ::prost::Message)]
520pub struct ConstraintKind {
521    #[prost(oneof = "constraint_kind::Kind", tags = "1, 2, 3, 4, 5, 6")]
522    pub kind: ::core::option::Option<constraint_kind::Kind>,
523}
524/// Nested message and enum types in `ConstraintKind`.
525pub mod constraint_kind {
526    #[derive(Clone, PartialEq, ::prost::Oneof)]
527    pub enum Kind {
528        #[prost(message, tag = "1")]
529        AllowedWindows(super::AllowedWindowsConstraint),
530        #[prost(message, tag = "2")]
531        Capacity(super::CapacityConstraint),
532        #[prost(message, tag = "3")]
533        Buffer(super::BufferConstraint),
534        #[prost(message, tag = "4")]
535        UsageCeiling(super::UsageCeilingConstraint),
536        #[prost(message, tag = "5")]
537        Precedence(super::PrecedenceConstraint),
538        #[prost(message, tag = "6")]
539        MutualExclusion(super::MutualExclusionConstraint),
540    }
541}
542#[derive(Clone, PartialEq, ::prost::Message)]
543pub struct AllowedWindowsConstraint {
544    #[prost(oneof = "allowed_windows_constraint::AllowedWindowsConstraint", tags = "1")]
545    pub allowed_windows_constraint: ::core::option::Option<
546        allowed_windows_constraint::AllowedWindowsConstraint,
547    >,
548}
549/// Nested message and enum types in `AllowedWindowsConstraint`.
550pub mod allowed_windows_constraint {
551    #[derive(Clone, PartialEq, ::prost::Oneof)]
552    pub enum AllowedWindowsConstraint {
553        #[prost(message, tag = "1")]
554        Explicit(super::ExplicitWindows),
555    }
556}
557#[derive(Clone, PartialEq, ::prost::Message)]
558pub struct ExplicitWindows {
559    #[prost(string, repeated, tag = "1")]
560    pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
561    #[prost(message, repeated, tag = "2")]
562    pub ranges: ::prost::alloc::vec::Vec<TimeRange>,
563}
564#[derive(Clone, Copy, PartialEq, ::prost::Message)]
565pub struct TimeRange {
566    #[prost(message, optional, tag = "1")]
567    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
568    #[prost(message, optional, tag = "2")]
569    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
570}
571#[derive(Clone, Copy, PartialEq, ::prost::Message)]
572pub struct CapacityConstraint {
573    #[prost(oneof = "capacity_constraint::CapacityConstraint", tags = "1")]
574    pub capacity_constraint: ::core::option::Option<
575        capacity_constraint::CapacityConstraint,
576    >,
577}
578/// Nested message and enum types in `CapacityConstraint`.
579pub mod capacity_constraint {
580    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
581    pub enum CapacityConstraint {
582        #[prost(message, tag = "1")]
583        Uniform(super::UniformCapacity),
584    }
585}
586#[derive(Clone, Copy, PartialEq, ::prost::Message)]
587pub struct UniformCapacity {
588    #[prost(int32, tag = "1")]
589    pub capacity: i32,
590}
591#[derive(Clone, Copy, PartialEq, ::prost::Message)]
592pub struct BufferConstraint {
593    #[prost(oneof = "buffer_constraint::BufferConstraint", tags = "1")]
594    pub buffer_constraint: ::core::option::Option<buffer_constraint::BufferConstraint>,
595}
596/// Nested message and enum types in `BufferConstraint`.
597pub mod buffer_constraint {
598    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
599    pub enum BufferConstraint {
600        #[prost(message, tag = "1")]
601        Fixed(super::FixedBuffer),
602    }
603}
604#[derive(Clone, Copy, PartialEq, ::prost::Message)]
605pub struct FixedBuffer {
606    #[prost(message, optional, tag = "1")]
607    pub min_gap: ::core::option::Option<MinuteDuration>,
608}
609#[derive(Clone, Copy, PartialEq, ::prost::Message)]
610pub struct UsageCeilingConstraint {
611    #[prost(oneof = "usage_ceiling_constraint::UsageCeilingConstraint", tags = "1")]
612    pub usage_ceiling_constraint: ::core::option::Option<
613        usage_ceiling_constraint::UsageCeilingConstraint,
614    >,
615}
616/// Nested message and enum types in `UsageCeilingConstraint`.
617pub mod usage_ceiling_constraint {
618    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
619    pub enum UsageCeilingConstraint {
620        #[prost(message, tag = "1")]
621        PerCalendarDay(super::DailyUsageCeiling),
622    }
623}
624#[derive(Clone, Copy, PartialEq, ::prost::Message)]
625pub struct DailyUsageCeiling {
626    #[prost(message, optional, tag = "1")]
627    pub max_duration: ::core::option::Option<MinuteDuration>,
628    #[prost(int32, optional, tag = "2")]
629    pub max_count: ::core::option::Option<i32>,
630}
631#[derive(Clone, PartialEq, ::prost::Message)]
632pub struct PrecedenceConstraint {
633    #[prost(oneof = "precedence_constraint::PrecedenceConstraint", tags = "1")]
634    pub precedence_constraint: ::core::option::Option<
635        precedence_constraint::PrecedenceConstraint,
636    >,
637}
638/// Nested message and enum types in `PrecedenceConstraint`.
639pub mod precedence_constraint {
640    #[derive(Clone, PartialEq, ::prost::Oneof)]
641    pub enum PrecedenceConstraint {
642        #[prost(message, tag = "1")]
643        After(super::ConstraintSubject),
644    }
645}
646#[derive(Clone, Copy, PartialEq, ::prost::Message)]
647pub struct MutualExclusionConstraint {
648    #[prost(
649        oneof = "mutual_exclusion_constraint::MutualExclusionConstraint",
650        tags = "1"
651    )]
652    pub mutual_exclusion_constraint: ::core::option::Option<
653        mutual_exclusion_constraint::MutualExclusionConstraint,
654    >,
655}
656/// Nested message and enum types in `MutualExclusionConstraint`.
657pub mod mutual_exclusion_constraint {
658    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
659    pub enum MutualExclusionConstraint {
660        #[prost(message, tag = "1")]
661        NoOverlap(super::NoOverlap),
662    }
663}
664#[derive(Clone, Copy, PartialEq, ::prost::Message)]
665pub struct NoOverlap {}
666#[derive(Clone, PartialEq, ::prost::Message)]
667pub struct CreatePlanRequest {
668    #[prost(message, optional, tag = "1")]
669    pub plan: ::core::option::Option<Plan>,
670    #[prost(string, tag = "2")]
671    pub message: ::prost::alloc::string::String,
672}
673#[derive(Clone, PartialEq, ::prost::Message)]
674pub struct CreatePlanResponse {
675    #[prost(message, optional, tag = "1")]
676    pub plan: ::core::option::Option<Plan>,
677}
678#[derive(Clone, PartialEq, ::prost::Message)]
679pub struct GetPlanRequest {
680    #[prost(string, tag = "1")]
681    pub plan_rid: ::prost::alloc::string::String,
682    #[prost(message, optional, tag = "2")]
683    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
684}
685#[derive(Clone, PartialEq, ::prost::Message)]
686pub struct GetPlanResponse {
687    #[prost(message, optional, tag = "1")]
688    pub plan: ::core::option::Option<Plan>,
689}
690#[derive(Clone, PartialEq, ::prost::Message)]
691pub struct BatchGetPlansRequest {
692    #[prost(string, repeated, tag = "1")]
693    pub plan_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
694}
695#[derive(Clone, PartialEq, ::prost::Message)]
696pub struct BatchGetPlansResponse {
697    #[prost(message, repeated, tag = "1")]
698    pub plans: ::prost::alloc::vec::Vec<Plan>,
699}
700#[derive(Clone, PartialEq, ::prost::Message)]
701pub struct BatchGetPlanSummariesRequest {
702    #[prost(string, repeated, tag = "1")]
703    pub plan_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
704}
705#[derive(Clone, PartialEq, ::prost::Message)]
706pub struct BatchGetPlanSummariesResponse {
707    #[prost(message, repeated, tag = "1")]
708    pub plans: ::prost::alloc::vec::Vec<PlanSummary>,
709}
710#[derive(Clone, PartialEq, ::prost::Message)]
711pub struct CreatePlanCommitRequest {
712    #[prost(string, tag = "1")]
713    pub plan_rid: ::prost::alloc::string::String,
714    #[prost(message, optional, tag = "2")]
715    pub content: ::core::option::Option<PlanContent>,
716    #[prost(string, optional, tag = "3")]
717    pub branch: ::core::option::Option<::prost::alloc::string::String>,
718    #[prost(string, tag = "4")]
719    pub message: ::prost::alloc::string::String,
720    #[prost(bool, tag = "5")]
721    pub is_working_state: bool,
722    #[prost(string, optional, tag = "6")]
723    pub expected_latest_commit: ::core::option::Option<::prost::alloc::string::String>,
724}
725#[derive(Clone, PartialEq, ::prost::Message)]
726pub struct CreatePlanCommitResponse {
727    #[prost(message, optional, tag = "1")]
728    pub plan: ::core::option::Option<Plan>,
729}
730#[derive(Clone, PartialEq, ::prost::Message)]
731pub struct UpdatePlanMetadataRequest {
732    #[prost(string, tag = "1")]
733    pub plan_rid: ::prost::alloc::string::String,
734    #[prost(string, optional, tag = "2")]
735    pub title: ::core::option::Option<::prost::alloc::string::String>,
736    #[prost(string, optional, tag = "3")]
737    pub description: ::core::option::Option<::prost::alloc::string::String>,
738    #[prost(message, optional, tag = "4")]
739    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
740    #[prost(message, optional, tag = "5")]
741    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
742    #[prost(bool, optional, tag = "6")]
743    pub is_archived: ::core::option::Option<bool>,
744    #[prost(bool, optional, tag = "7")]
745    pub is_published: ::core::option::Option<bool>,
746    #[prost(message, optional, tag = "8")]
747    pub status: ::core::option::Option<PlanStatus>,
748}
749#[derive(Clone, PartialEq, ::prost::Message)]
750pub struct UpdatePlanMetadataResponse {
751    #[prost(message, optional, tag = "1")]
752    pub metadata: ::core::option::Option<PlanMetadata>,
753}
754#[derive(Clone, PartialEq, ::prost::Message)]
755pub struct SearchPlansQuery {
756    #[prost(
757        oneof = "search_plans_query::Query",
758        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
759    )]
760    pub query: ::core::option::Option<search_plans_query::Query>,
761}
762/// Nested message and enum types in `SearchPlansQuery`.
763pub mod search_plans_query {
764    #[derive(Clone, PartialEq, ::prost::Oneof)]
765    pub enum Query {
766        #[prost(message, tag = "1")]
767        And(super::SearchPlansQueryList),
768        #[prost(message, tag = "2")]
769        Or(super::SearchPlansQueryList),
770        #[prost(message, tag = "3")]
771        Not(::prost::alloc::boxed::Box<super::SearchPlansQuery>),
772        #[prost(string, tag = "4")]
773        ExactMatch(::prost::alloc::string::String),
774        #[prost(string, tag = "5")]
775        SearchText(::prost::alloc::string::String),
776        #[prost(message, tag = "6")]
777        Labels(super::super::super::types::LabelsFilter),
778        #[prost(message, tag = "7")]
779        Properties(super::super::super::types::PropertiesFilter),
780        #[prost(string, tag = "8")]
781        CreatedBy(::prost::alloc::string::String),
782        #[prost(bool, tag = "9")]
783        IsArchived(bool),
784        #[prost(bool, tag = "10")]
785        IsPublished(bool),
786        #[prost(bool, tag = "11")]
787        AuthorIsCurrentUser(bool),
788        #[prost(message, tag = "12")]
789        AuthorRids(super::UserRidList),
790        #[prost(string, tag = "13")]
791        WorkspaceRid(::prost::alloc::string::String),
792        #[prost(message, tag = "14")]
793        DateRangeOverlaps(super::PlanDateRangeFilter),
794        #[prost(message, tag = "15")]
795        Status(super::PlanStatus),
796    }
797}
798#[derive(Clone, Copy, PartialEq, ::prost::Message)]
799pub struct PlanDateRangeFilter {
800    #[prost(message, optional, tag = "1")]
801    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
802    #[prost(message, optional, tag = "2")]
803    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
804}
805#[derive(Clone, PartialEq, ::prost::Message)]
806pub struct SearchPlansQueryList {
807    #[prost(message, repeated, tag = "1")]
808    pub queries: ::prost::alloc::vec::Vec<SearchPlansQuery>,
809}
810#[derive(Clone, PartialEq, ::prost::Message)]
811pub struct UserRidList {
812    #[prost(string, repeated, tag = "1")]
813    pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
814}
815#[derive(Clone, Copy, PartialEq, ::prost::Message)]
816pub struct PlanSortOptions {
817    #[prost(enumeration = "PlanSortField", tag = "1")]
818    pub field: i32,
819    #[prost(bool, tag = "2")]
820    pub is_descending: bool,
821}
822#[derive(Clone, PartialEq, ::prost::Message)]
823pub struct SearchPlansRequest {
824    #[prost(message, optional, tag = "1")]
825    pub query: ::core::option::Option<SearchPlansQuery>,
826    #[prost(message, optional, tag = "2")]
827    pub sort: ::core::option::Option<PlanSortOptions>,
828    #[prost(string, optional, tag = "3")]
829    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
830    #[prost(int32, optional, tag = "4")]
831    pub page_size: ::core::option::Option<i32>,
832}
833#[derive(Clone, PartialEq, ::prost::Message)]
834pub struct SearchPlansResponse {
835    #[prost(message, repeated, tag = "1")]
836    pub results: ::prost::alloc::vec::Vec<PlanSummary>,
837    #[prost(string, optional, tag = "2")]
838    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
839}
840#[derive(Clone, PartialEq, ::prost::Message)]
841pub struct ValidatePlanRequest {
842    #[prost(oneof = "validate_plan_request::Source", tags = "1, 2")]
843    pub source: ::core::option::Option<validate_plan_request::Source>,
844}
845/// Nested message and enum types in `ValidatePlanRequest`.
846pub mod validate_plan_request {
847    #[derive(Clone, PartialEq, ::prost::Oneof)]
848    pub enum Source {
849        #[prost(message, tag = "1")]
850        Plan(super::StoredPlanRevision),
851        #[prost(message, tag = "2")]
852        Content(super::PlanContent),
853    }
854}
855#[derive(Clone, PartialEq, ::prost::Message)]
856pub struct StoredPlanRevision {
857    #[prost(string, tag = "1")]
858    pub plan_rid: ::prost::alloc::string::String,
859    #[prost(message, optional, tag = "2")]
860    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
861}
862#[derive(Clone, PartialEq, ::prost::Message)]
863pub struct ValidatePlanResponse {
864    #[prost(message, repeated, tag = "1")]
865    pub violations: ::prost::alloc::vec::Vec<PlanViolation>,
866    #[prost(bool, tag = "2")]
867    pub is_truncated: bool,
868    #[prost(message, optional, tag = "3")]
869    pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
870}
871#[derive(Clone, PartialEq, ::prost::Message)]
872pub struct PlanViolation {
873    #[prost(enumeration = "PlanViolationSeverity", tag = "1")]
874    pub severity: i32,
875    #[prost(string, tag = "2")]
876    pub code: ::prost::alloc::string::String,
877    #[prost(string, tag = "3")]
878    pub message: ::prost::alloc::string::String,
879    #[prost(message, repeated, tag = "4")]
880    pub subjects: ::prost::alloc::vec::Vec<PlanViolationSubject>,
881}
882#[derive(Clone, PartialEq, ::prost::Message)]
883pub struct PlanViolationSubject {
884    #[prost(enumeration = "PlanElementKind", tag = "1")]
885    pub kind: i32,
886    #[prost(string, tag = "2")]
887    pub id: ::prost::alloc::string::String,
888    #[prost(string, tag = "3")]
889    pub path: ::prost::alloc::string::String,
890}
891#[derive(Clone, PartialEq, ::prost::Message)]
892pub struct ListPlanAssetGroupSummariesRequest {
893    #[prost(string, tag = "1")]
894    pub plan_rid: ::prost::alloc::string::String,
895    #[prost(message, optional, tag = "2")]
896    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
897    #[prost(string, optional, tag = "3")]
898    pub containing_asset_rid: ::core::option::Option<::prost::alloc::string::String>,
899}
900#[derive(Clone, PartialEq, ::prost::Message)]
901pub struct ListPlanAssetGroupSummariesResponse {
902    #[prost(message, repeated, tag = "1")]
903    pub asset_group_summaries: ::prost::alloc::vec::Vec<AssetGroupSummary>,
904    #[prost(message, optional, tag = "2")]
905    pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
906}
907#[derive(Clone, PartialEq, ::prost::Message)]
908pub struct AssetGroupSummary {
909    #[prost(string, tag = "1")]
910    pub asset_group_id: ::prost::alloc::string::String,
911    #[prost(int32, tag = "2")]
912    pub asset_count: i32,
913}
914#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
915#[repr(i32)]
916pub enum PlanSortField {
917    Unspecified = 0,
918    Name = 1,
919    CreatedAt = 2,
920    EditedAt = 3,
921    StartDate = 4,
922    EndDate = 5,
923}
924impl PlanSortField {
925    /// String value of the enum field names used in the ProtoBuf definition.
926    ///
927    /// The values are not transformed in any way and thus are considered stable
928    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
929    pub fn as_str_name(&self) -> &'static str {
930        match self {
931            Self::Unspecified => "PLAN_SORT_FIELD_UNSPECIFIED",
932            Self::Name => "NAME",
933            Self::CreatedAt => "CREATED_AT",
934            Self::EditedAt => "EDITED_AT",
935            Self::StartDate => "START_DATE",
936            Self::EndDate => "END_DATE",
937        }
938    }
939    /// Creates an enum from field names used in the ProtoBuf definition.
940    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
941        match value {
942            "PLAN_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
943            "NAME" => Some(Self::Name),
944            "CREATED_AT" => Some(Self::CreatedAt),
945            "EDITED_AT" => Some(Self::EditedAt),
946            "START_DATE" => Some(Self::StartDate),
947            "END_DATE" => Some(Self::EndDate),
948            _ => None,
949        }
950    }
951}
952#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
953#[repr(i32)]
954pub enum PlanViolationSeverity {
955    Unspecified = 0,
956    Error = 1,
957    Warning = 2,
958}
959impl PlanViolationSeverity {
960    /// String value of the enum field names used in the ProtoBuf definition.
961    ///
962    /// The values are not transformed in any way and thus are considered stable
963    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
964    pub fn as_str_name(&self) -> &'static str {
965        match self {
966            Self::Unspecified => "PLAN_VIOLATION_SEVERITY_UNSPECIFIED",
967            Self::Error => "PLAN_VIOLATION_SEVERITY_ERROR",
968            Self::Warning => "PLAN_VIOLATION_SEVERITY_WARNING",
969        }
970    }
971    /// Creates an enum from field names used in the ProtoBuf definition.
972    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
973        match value {
974            "PLAN_VIOLATION_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
975            "PLAN_VIOLATION_SEVERITY_ERROR" => Some(Self::Error),
976            "PLAN_VIOLATION_SEVERITY_WARNING" => Some(Self::Warning),
977            _ => None,
978        }
979    }
980}
981#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
982#[repr(i32)]
983pub enum PlanElementKind {
984    Unspecified = 0,
985    Plan = 1,
986    Objective = 2,
987    Activity = 3,
988    Segment = 4,
989    Milestone = 5,
990    AssetGroup = 6,
991    Constraint = 7,
992    Resource = 8,
993}
994impl PlanElementKind {
995    /// String value of the enum field names used in the ProtoBuf definition.
996    ///
997    /// The values are not transformed in any way and thus are considered stable
998    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
999    pub fn as_str_name(&self) -> &'static str {
1000        match self {
1001            Self::Unspecified => "PLAN_ELEMENT_KIND_UNSPECIFIED",
1002            Self::Plan => "PLAN_ELEMENT_KIND_PLAN",
1003            Self::Objective => "PLAN_ELEMENT_KIND_OBJECTIVE",
1004            Self::Activity => "PLAN_ELEMENT_KIND_ACTIVITY",
1005            Self::Segment => "PLAN_ELEMENT_KIND_SEGMENT",
1006            Self::Milestone => "PLAN_ELEMENT_KIND_MILESTONE",
1007            Self::AssetGroup => "PLAN_ELEMENT_KIND_ASSET_GROUP",
1008            Self::Constraint => "PLAN_ELEMENT_KIND_CONSTRAINT",
1009            Self::Resource => "PLAN_ELEMENT_KIND_RESOURCE",
1010        }
1011    }
1012    /// Creates an enum from field names used in the ProtoBuf definition.
1013    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1014        match value {
1015            "PLAN_ELEMENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1016            "PLAN_ELEMENT_KIND_PLAN" => Some(Self::Plan),
1017            "PLAN_ELEMENT_KIND_OBJECTIVE" => Some(Self::Objective),
1018            "PLAN_ELEMENT_KIND_ACTIVITY" => Some(Self::Activity),
1019            "PLAN_ELEMENT_KIND_SEGMENT" => Some(Self::Segment),
1020            "PLAN_ELEMENT_KIND_MILESTONE" => Some(Self::Milestone),
1021            "PLAN_ELEMENT_KIND_ASSET_GROUP" => Some(Self::AssetGroup),
1022            "PLAN_ELEMENT_KIND_CONSTRAINT" => Some(Self::Constraint),
1023            "PLAN_ELEMENT_KIND_RESOURCE" => Some(Self::Resource),
1024            _ => None,
1025        }
1026    }
1027}
1028#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1029#[repr(i32)]
1030pub enum PlanError {
1031    PlanNotFound = 0,
1032    BranchOrCommitNotFound = 1,
1033    CommitConflict = 2,
1034    PlanArchived = 3,
1035}
1036impl PlanError {
1037    /// String value of the enum field names used in the ProtoBuf definition.
1038    ///
1039    /// The values are not transformed in any way and thus are considered stable
1040    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1041    pub fn as_str_name(&self) -> &'static str {
1042        match self {
1043            Self::PlanNotFound => "PLAN_ERROR_PLAN_NOT_FOUND",
1044            Self::BranchOrCommitNotFound => "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND",
1045            Self::CommitConflict => "PLAN_ERROR_COMMIT_CONFLICT",
1046            Self::PlanArchived => "PLAN_ERROR_PLAN_ARCHIVED",
1047        }
1048    }
1049    /// Creates an enum from field names used in the ProtoBuf definition.
1050    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1051        match value {
1052            "PLAN_ERROR_PLAN_NOT_FOUND" => Some(Self::PlanNotFound),
1053            "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND" => Some(Self::BranchOrCommitNotFound),
1054            "PLAN_ERROR_COMMIT_CONFLICT" => Some(Self::CommitConflict),
1055            "PLAN_ERROR_PLAN_ARCHIVED" => Some(Self::PlanArchived),
1056            _ => None,
1057        }
1058    }
1059}
1060/// Generated client implementations.
1061pub mod plan_service_client {
1062    #![allow(
1063        unused_variables,
1064        dead_code,
1065        missing_docs,
1066        clippy::wildcard_imports,
1067        clippy::let_unit_value,
1068    )]
1069    use tonic::codegen::*;
1070    use tonic::codegen::http::Uri;
1071    #[derive(Debug, Clone)]
1072    pub struct PlanServiceClient<T> {
1073        inner: tonic::client::Grpc<T>,
1074    }
1075    impl PlanServiceClient<tonic::transport::Channel> {
1076        /// Attempt to create a new client by connecting to a given endpoint.
1077        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1078        where
1079            D: TryInto<tonic::transport::Endpoint>,
1080            D::Error: Into<StdError>,
1081        {
1082            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1083            Ok(Self::new(conn))
1084        }
1085    }
1086    impl<T> PlanServiceClient<T>
1087    where
1088        T: tonic::client::GrpcService<tonic::body::Body>,
1089        T::Error: Into<StdError>,
1090        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1091        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1092    {
1093        pub fn new(inner: T) -> Self {
1094            let inner = tonic::client::Grpc::new(inner);
1095            Self { inner }
1096        }
1097        pub fn with_origin(inner: T, origin: Uri) -> Self {
1098            let inner = tonic::client::Grpc::with_origin(inner, origin);
1099            Self { inner }
1100        }
1101        pub fn with_interceptor<F>(
1102            inner: T,
1103            interceptor: F,
1104        ) -> PlanServiceClient<InterceptedService<T, F>>
1105        where
1106            F: tonic::service::Interceptor,
1107            T::ResponseBody: Default,
1108            T: tonic::codegen::Service<
1109                http::Request<tonic::body::Body>,
1110                Response = http::Response<
1111                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1112                >,
1113            >,
1114            <T as tonic::codegen::Service<
1115                http::Request<tonic::body::Body>,
1116            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1117        {
1118            PlanServiceClient::new(InterceptedService::new(inner, interceptor))
1119        }
1120        /// Compress requests with the given encoding.
1121        ///
1122        /// This requires the server to support it otherwise it might respond with an
1123        /// error.
1124        #[must_use]
1125        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1126            self.inner = self.inner.send_compressed(encoding);
1127            self
1128        }
1129        /// Enable decompressing responses.
1130        #[must_use]
1131        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1132            self.inner = self.inner.accept_compressed(encoding);
1133            self
1134        }
1135        /// Limits the maximum size of a decoded message.
1136        ///
1137        /// Default: `4MB`
1138        #[must_use]
1139        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1140            self.inner = self.inner.max_decoding_message_size(limit);
1141            self
1142        }
1143        /// Limits the maximum size of an encoded message.
1144        ///
1145        /// Default: `usize::MAX`
1146        #[must_use]
1147        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1148            self.inner = self.inner.max_encoding_message_size(limit);
1149            self
1150        }
1151        pub async fn create_plan(
1152            &mut self,
1153            request: impl tonic::IntoRequest<super::CreatePlanRequest>,
1154        ) -> std::result::Result<
1155            tonic::Response<super::CreatePlanResponse>,
1156            tonic::Status,
1157        > {
1158            self.inner
1159                .ready()
1160                .await
1161                .map_err(|e| {
1162                    tonic::Status::unknown(
1163                        format!("Service was not ready: {}", e.into()),
1164                    )
1165                })?;
1166            let codec = tonic::codec::ProstCodec::default();
1167            let path = http::uri::PathAndQuery::from_static(
1168                "/nominal.plan.v1.PlanService/CreatePlan",
1169            );
1170            let mut req = request.into_request();
1171            req.extensions_mut()
1172                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlan"));
1173            self.inner.unary(req, path, codec).await
1174        }
1175        pub async fn get_plan(
1176            &mut self,
1177            request: impl tonic::IntoRequest<super::GetPlanRequest>,
1178        ) -> std::result::Result<
1179            tonic::Response<super::GetPlanResponse>,
1180            tonic::Status,
1181        > {
1182            self.inner
1183                .ready()
1184                .await
1185                .map_err(|e| {
1186                    tonic::Status::unknown(
1187                        format!("Service was not ready: {}", e.into()),
1188                    )
1189                })?;
1190            let codec = tonic::codec::ProstCodec::default();
1191            let path = http::uri::PathAndQuery::from_static(
1192                "/nominal.plan.v1.PlanService/GetPlan",
1193            );
1194            let mut req = request.into_request();
1195            req.extensions_mut()
1196                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "GetPlan"));
1197            self.inner.unary(req, path, codec).await
1198        }
1199        pub async fn batch_get_plans(
1200            &mut self,
1201            request: impl tonic::IntoRequest<super::BatchGetPlansRequest>,
1202        ) -> std::result::Result<
1203            tonic::Response<super::BatchGetPlansResponse>,
1204            tonic::Status,
1205        > {
1206            self.inner
1207                .ready()
1208                .await
1209                .map_err(|e| {
1210                    tonic::Status::unknown(
1211                        format!("Service was not ready: {}", e.into()),
1212                    )
1213                })?;
1214            let codec = tonic::codec::ProstCodec::default();
1215            let path = http::uri::PathAndQuery::from_static(
1216                "/nominal.plan.v1.PlanService/BatchGetPlans",
1217            );
1218            let mut req = request.into_request();
1219            req.extensions_mut()
1220                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "BatchGetPlans"));
1221            self.inner.unary(req, path, codec).await
1222        }
1223        pub async fn batch_get_plan_summaries(
1224            &mut self,
1225            request: impl tonic::IntoRequest<super::BatchGetPlanSummariesRequest>,
1226        ) -> std::result::Result<
1227            tonic::Response<super::BatchGetPlanSummariesResponse>,
1228            tonic::Status,
1229        > {
1230            self.inner
1231                .ready()
1232                .await
1233                .map_err(|e| {
1234                    tonic::Status::unknown(
1235                        format!("Service was not ready: {}", e.into()),
1236                    )
1237                })?;
1238            let codec = tonic::codec::ProstCodec::default();
1239            let path = http::uri::PathAndQuery::from_static(
1240                "/nominal.plan.v1.PlanService/BatchGetPlanSummaries",
1241            );
1242            let mut req = request.into_request();
1243            req.extensions_mut()
1244                .insert(
1245                    GrpcMethod::new(
1246                        "nominal.plan.v1.PlanService",
1247                        "BatchGetPlanSummaries",
1248                    ),
1249                );
1250            self.inner.unary(req, path, codec).await
1251        }
1252        pub async fn create_plan_commit(
1253            &mut self,
1254            request: impl tonic::IntoRequest<super::CreatePlanCommitRequest>,
1255        ) -> std::result::Result<
1256            tonic::Response<super::CreatePlanCommitResponse>,
1257            tonic::Status,
1258        > {
1259            self.inner
1260                .ready()
1261                .await
1262                .map_err(|e| {
1263                    tonic::Status::unknown(
1264                        format!("Service was not ready: {}", e.into()),
1265                    )
1266                })?;
1267            let codec = tonic::codec::ProstCodec::default();
1268            let path = http::uri::PathAndQuery::from_static(
1269                "/nominal.plan.v1.PlanService/CreatePlanCommit",
1270            );
1271            let mut req = request.into_request();
1272            req.extensions_mut()
1273                .insert(
1274                    GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlanCommit"),
1275                );
1276            self.inner.unary(req, path, codec).await
1277        }
1278        pub async fn update_plan_metadata(
1279            &mut self,
1280            request: impl tonic::IntoRequest<super::UpdatePlanMetadataRequest>,
1281        ) -> std::result::Result<
1282            tonic::Response<super::UpdatePlanMetadataResponse>,
1283            tonic::Status,
1284        > {
1285            self.inner
1286                .ready()
1287                .await
1288                .map_err(|e| {
1289                    tonic::Status::unknown(
1290                        format!("Service was not ready: {}", e.into()),
1291                    )
1292                })?;
1293            let codec = tonic::codec::ProstCodec::default();
1294            let path = http::uri::PathAndQuery::from_static(
1295                "/nominal.plan.v1.PlanService/UpdatePlanMetadata",
1296            );
1297            let mut req = request.into_request();
1298            req.extensions_mut()
1299                .insert(
1300                    GrpcMethod::new("nominal.plan.v1.PlanService", "UpdatePlanMetadata"),
1301                );
1302            self.inner.unary(req, path, codec).await
1303        }
1304        pub async fn search_plans(
1305            &mut self,
1306            request: impl tonic::IntoRequest<super::SearchPlansRequest>,
1307        ) -> std::result::Result<
1308            tonic::Response<super::SearchPlansResponse>,
1309            tonic::Status,
1310        > {
1311            self.inner
1312                .ready()
1313                .await
1314                .map_err(|e| {
1315                    tonic::Status::unknown(
1316                        format!("Service was not ready: {}", e.into()),
1317                    )
1318                })?;
1319            let codec = tonic::codec::ProstCodec::default();
1320            let path = http::uri::PathAndQuery::from_static(
1321                "/nominal.plan.v1.PlanService/SearchPlans",
1322            );
1323            let mut req = request.into_request();
1324            req.extensions_mut()
1325                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "SearchPlans"));
1326            self.inner.unary(req, path, codec).await
1327        }
1328        pub async fn validate_plan(
1329            &mut self,
1330            request: impl tonic::IntoRequest<super::ValidatePlanRequest>,
1331        ) -> std::result::Result<
1332            tonic::Response<super::ValidatePlanResponse>,
1333            tonic::Status,
1334        > {
1335            self.inner
1336                .ready()
1337                .await
1338                .map_err(|e| {
1339                    tonic::Status::unknown(
1340                        format!("Service was not ready: {}", e.into()),
1341                    )
1342                })?;
1343            let codec = tonic::codec::ProstCodec::default();
1344            let path = http::uri::PathAndQuery::from_static(
1345                "/nominal.plan.v1.PlanService/ValidatePlan",
1346            );
1347            let mut req = request.into_request();
1348            req.extensions_mut()
1349                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "ValidatePlan"));
1350            self.inner.unary(req, path, codec).await
1351        }
1352        pub async fn list_plan_asset_group_summaries(
1353            &mut self,
1354            request: impl tonic::IntoRequest<super::ListPlanAssetGroupSummariesRequest>,
1355        ) -> std::result::Result<
1356            tonic::Response<super::ListPlanAssetGroupSummariesResponse>,
1357            tonic::Status,
1358        > {
1359            self.inner
1360                .ready()
1361                .await
1362                .map_err(|e| {
1363                    tonic::Status::unknown(
1364                        format!("Service was not ready: {}", e.into()),
1365                    )
1366                })?;
1367            let codec = tonic::codec::ProstCodec::default();
1368            let path = http::uri::PathAndQuery::from_static(
1369                "/nominal.plan.v1.PlanService/ListPlanAssetGroupSummaries",
1370            );
1371            let mut req = request.into_request();
1372            req.extensions_mut()
1373                .insert(
1374                    GrpcMethod::new(
1375                        "nominal.plan.v1.PlanService",
1376                        "ListPlanAssetGroupSummaries",
1377                    ),
1378                );
1379            self.inner.unary(req, path, codec).await
1380        }
1381    }
1382}