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 CreatePlanCommitRequest {
702    #[prost(string, tag = "1")]
703    pub plan_rid: ::prost::alloc::string::String,
704    #[prost(message, optional, tag = "2")]
705    pub content: ::core::option::Option<PlanContent>,
706    #[prost(string, optional, tag = "3")]
707    pub branch: ::core::option::Option<::prost::alloc::string::String>,
708    #[prost(string, tag = "4")]
709    pub message: ::prost::alloc::string::String,
710    #[prost(bool, tag = "5")]
711    pub is_working_state: bool,
712    #[prost(string, optional, tag = "6")]
713    pub expected_latest_commit: ::core::option::Option<::prost::alloc::string::String>,
714}
715#[derive(Clone, PartialEq, ::prost::Message)]
716pub struct CreatePlanCommitResponse {
717    #[prost(message, optional, tag = "1")]
718    pub plan: ::core::option::Option<Plan>,
719}
720#[derive(Clone, PartialEq, ::prost::Message)]
721pub struct UpdatePlanMetadataRequest {
722    #[prost(string, tag = "1")]
723    pub plan_rid: ::prost::alloc::string::String,
724    #[prost(string, optional, tag = "2")]
725    pub title: ::core::option::Option<::prost::alloc::string::String>,
726    #[prost(string, optional, tag = "3")]
727    pub description: ::core::option::Option<::prost::alloc::string::String>,
728    #[prost(message, optional, tag = "4")]
729    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
730    #[prost(message, optional, tag = "5")]
731    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
732    #[prost(bool, optional, tag = "6")]
733    pub is_archived: ::core::option::Option<bool>,
734    #[prost(bool, optional, tag = "7")]
735    pub is_published: ::core::option::Option<bool>,
736    #[prost(message, optional, tag = "8")]
737    pub status: ::core::option::Option<PlanStatus>,
738}
739#[derive(Clone, PartialEq, ::prost::Message)]
740pub struct UpdatePlanMetadataResponse {
741    #[prost(message, optional, tag = "1")]
742    pub metadata: ::core::option::Option<PlanMetadata>,
743}
744#[derive(Clone, PartialEq, ::prost::Message)]
745pub struct SearchPlansQuery {
746    #[prost(
747        oneof = "search_plans_query::Query",
748        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15"
749    )]
750    pub query: ::core::option::Option<search_plans_query::Query>,
751}
752/// Nested message and enum types in `SearchPlansQuery`.
753pub mod search_plans_query {
754    #[derive(Clone, PartialEq, ::prost::Oneof)]
755    pub enum Query {
756        #[prost(message, tag = "1")]
757        And(super::SearchPlansQueryList),
758        #[prost(message, tag = "2")]
759        Or(super::SearchPlansQueryList),
760        #[prost(message, tag = "3")]
761        Not(::prost::alloc::boxed::Box<super::SearchPlansQuery>),
762        #[prost(string, tag = "4")]
763        ExactMatch(::prost::alloc::string::String),
764        #[prost(string, tag = "5")]
765        SearchText(::prost::alloc::string::String),
766        #[prost(message, tag = "6")]
767        Labels(super::super::super::types::LabelsFilter),
768        #[prost(message, tag = "7")]
769        Properties(super::super::super::types::PropertiesFilter),
770        #[prost(string, tag = "8")]
771        CreatedBy(::prost::alloc::string::String),
772        #[prost(bool, tag = "9")]
773        IsArchived(bool),
774        #[prost(bool, tag = "10")]
775        IsPublished(bool),
776        #[prost(bool, tag = "11")]
777        AuthorIsCurrentUser(bool),
778        #[prost(message, tag = "12")]
779        AuthorRids(super::UserRidList),
780        #[prost(string, tag = "13")]
781        WorkspaceRid(::prost::alloc::string::String),
782        #[prost(message, tag = "14")]
783        DateRangeOverlaps(super::PlanDateRangeFilter),
784        #[prost(message, tag = "15")]
785        Status(super::PlanStatus),
786    }
787}
788#[derive(Clone, Copy, PartialEq, ::prost::Message)]
789pub struct PlanDateRangeFilter {
790    #[prost(message, optional, tag = "1")]
791    pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
792    #[prost(message, optional, tag = "2")]
793    pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
794}
795#[derive(Clone, PartialEq, ::prost::Message)]
796pub struct SearchPlansQueryList {
797    #[prost(message, repeated, tag = "1")]
798    pub queries: ::prost::alloc::vec::Vec<SearchPlansQuery>,
799}
800#[derive(Clone, PartialEq, ::prost::Message)]
801pub struct UserRidList {
802    #[prost(string, repeated, tag = "1")]
803    pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
804}
805#[derive(Clone, Copy, PartialEq, ::prost::Message)]
806pub struct PlanSortOptions {
807    #[prost(enumeration = "PlanSortField", tag = "1")]
808    pub field: i32,
809    #[prost(bool, tag = "2")]
810    pub is_descending: bool,
811}
812#[derive(Clone, PartialEq, ::prost::Message)]
813pub struct SearchPlansRequest {
814    #[prost(message, optional, tag = "1")]
815    pub query: ::core::option::Option<SearchPlansQuery>,
816    #[prost(message, optional, tag = "2")]
817    pub sort: ::core::option::Option<PlanSortOptions>,
818    #[prost(string, optional, tag = "3")]
819    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
820    #[prost(int32, optional, tag = "4")]
821    pub page_size: ::core::option::Option<i32>,
822}
823#[derive(Clone, PartialEq, ::prost::Message)]
824pub struct SearchPlansResponse {
825    #[prost(message, repeated, tag = "1")]
826    pub results: ::prost::alloc::vec::Vec<PlanSummary>,
827    #[prost(string, optional, tag = "2")]
828    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
829}
830#[derive(Clone, PartialEq, ::prost::Message)]
831pub struct ValidatePlanRequest {
832    #[prost(oneof = "validate_plan_request::Source", tags = "1, 2")]
833    pub source: ::core::option::Option<validate_plan_request::Source>,
834}
835/// Nested message and enum types in `ValidatePlanRequest`.
836pub mod validate_plan_request {
837    #[derive(Clone, PartialEq, ::prost::Oneof)]
838    pub enum Source {
839        #[prost(message, tag = "1")]
840        Plan(super::StoredPlanRevision),
841        #[prost(message, tag = "2")]
842        Content(super::PlanContent),
843    }
844}
845#[derive(Clone, PartialEq, ::prost::Message)]
846pub struct StoredPlanRevision {
847    #[prost(string, tag = "1")]
848    pub plan_rid: ::prost::alloc::string::String,
849    #[prost(message, optional, tag = "2")]
850    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
851}
852#[derive(Clone, PartialEq, ::prost::Message)]
853pub struct ValidatePlanResponse {
854    #[prost(message, repeated, tag = "1")]
855    pub violations: ::prost::alloc::vec::Vec<PlanViolation>,
856    #[prost(bool, tag = "2")]
857    pub is_truncated: bool,
858    #[prost(message, optional, tag = "3")]
859    pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
860}
861#[derive(Clone, PartialEq, ::prost::Message)]
862pub struct PlanViolation {
863    #[prost(enumeration = "PlanViolationSeverity", tag = "1")]
864    pub severity: i32,
865    #[prost(string, tag = "2")]
866    pub code: ::prost::alloc::string::String,
867    #[prost(string, tag = "3")]
868    pub message: ::prost::alloc::string::String,
869    #[prost(message, repeated, tag = "4")]
870    pub subjects: ::prost::alloc::vec::Vec<PlanViolationSubject>,
871}
872#[derive(Clone, PartialEq, ::prost::Message)]
873pub struct PlanViolationSubject {
874    #[prost(enumeration = "PlanElementKind", tag = "1")]
875    pub kind: i32,
876    #[prost(string, tag = "2")]
877    pub id: ::prost::alloc::string::String,
878    #[prost(string, tag = "3")]
879    pub path: ::prost::alloc::string::String,
880}
881#[derive(Clone, PartialEq, ::prost::Message)]
882pub struct ListPlanAssetGroupSummariesRequest {
883    #[prost(string, tag = "1")]
884    pub plan_rid: ::prost::alloc::string::String,
885    #[prost(message, optional, tag = "2")]
886    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
887    #[prost(string, optional, tag = "3")]
888    pub containing_asset_rid: ::core::option::Option<::prost::alloc::string::String>,
889}
890#[derive(Clone, PartialEq, ::prost::Message)]
891pub struct ListPlanAssetGroupSummariesResponse {
892    #[prost(message, repeated, tag = "1")]
893    pub asset_group_summaries: ::prost::alloc::vec::Vec<AssetGroupSummary>,
894    #[prost(message, optional, tag = "2")]
895    pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
896}
897#[derive(Clone, PartialEq, ::prost::Message)]
898pub struct AssetGroupSummary {
899    #[prost(string, tag = "1")]
900    pub asset_group_id: ::prost::alloc::string::String,
901    #[prost(int32, tag = "2")]
902    pub asset_count: i32,
903}
904#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
905#[repr(i32)]
906pub enum PlanSortField {
907    Unspecified = 0,
908    Name = 1,
909    CreatedAt = 2,
910    EditedAt = 3,
911    StartDate = 4,
912    EndDate = 5,
913}
914impl PlanSortField {
915    /// String value of the enum field names used in the ProtoBuf definition.
916    ///
917    /// The values are not transformed in any way and thus are considered stable
918    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
919    pub fn as_str_name(&self) -> &'static str {
920        match self {
921            Self::Unspecified => "PLAN_SORT_FIELD_UNSPECIFIED",
922            Self::Name => "NAME",
923            Self::CreatedAt => "CREATED_AT",
924            Self::EditedAt => "EDITED_AT",
925            Self::StartDate => "START_DATE",
926            Self::EndDate => "END_DATE",
927        }
928    }
929    /// Creates an enum from field names used in the ProtoBuf definition.
930    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
931        match value {
932            "PLAN_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
933            "NAME" => Some(Self::Name),
934            "CREATED_AT" => Some(Self::CreatedAt),
935            "EDITED_AT" => Some(Self::EditedAt),
936            "START_DATE" => Some(Self::StartDate),
937            "END_DATE" => Some(Self::EndDate),
938            _ => None,
939        }
940    }
941}
942#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
943#[repr(i32)]
944pub enum PlanViolationSeverity {
945    Unspecified = 0,
946    Error = 1,
947    Warning = 2,
948}
949impl PlanViolationSeverity {
950    /// String value of the enum field names used in the ProtoBuf definition.
951    ///
952    /// The values are not transformed in any way and thus are considered stable
953    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
954    pub fn as_str_name(&self) -> &'static str {
955        match self {
956            Self::Unspecified => "PLAN_VIOLATION_SEVERITY_UNSPECIFIED",
957            Self::Error => "PLAN_VIOLATION_SEVERITY_ERROR",
958            Self::Warning => "PLAN_VIOLATION_SEVERITY_WARNING",
959        }
960    }
961    /// Creates an enum from field names used in the ProtoBuf definition.
962    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
963        match value {
964            "PLAN_VIOLATION_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
965            "PLAN_VIOLATION_SEVERITY_ERROR" => Some(Self::Error),
966            "PLAN_VIOLATION_SEVERITY_WARNING" => Some(Self::Warning),
967            _ => None,
968        }
969    }
970}
971#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
972#[repr(i32)]
973pub enum PlanElementKind {
974    Unspecified = 0,
975    Plan = 1,
976    Objective = 2,
977    Activity = 3,
978    Segment = 4,
979    Milestone = 5,
980    AssetGroup = 6,
981    Constraint = 7,
982    Resource = 8,
983}
984impl PlanElementKind {
985    /// String value of the enum field names used in the ProtoBuf definition.
986    ///
987    /// The values are not transformed in any way and thus are considered stable
988    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
989    pub fn as_str_name(&self) -> &'static str {
990        match self {
991            Self::Unspecified => "PLAN_ELEMENT_KIND_UNSPECIFIED",
992            Self::Plan => "PLAN_ELEMENT_KIND_PLAN",
993            Self::Objective => "PLAN_ELEMENT_KIND_OBJECTIVE",
994            Self::Activity => "PLAN_ELEMENT_KIND_ACTIVITY",
995            Self::Segment => "PLAN_ELEMENT_KIND_SEGMENT",
996            Self::Milestone => "PLAN_ELEMENT_KIND_MILESTONE",
997            Self::AssetGroup => "PLAN_ELEMENT_KIND_ASSET_GROUP",
998            Self::Constraint => "PLAN_ELEMENT_KIND_CONSTRAINT",
999            Self::Resource => "PLAN_ELEMENT_KIND_RESOURCE",
1000        }
1001    }
1002    /// Creates an enum from field names used in the ProtoBuf definition.
1003    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1004        match value {
1005            "PLAN_ELEMENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1006            "PLAN_ELEMENT_KIND_PLAN" => Some(Self::Plan),
1007            "PLAN_ELEMENT_KIND_OBJECTIVE" => Some(Self::Objective),
1008            "PLAN_ELEMENT_KIND_ACTIVITY" => Some(Self::Activity),
1009            "PLAN_ELEMENT_KIND_SEGMENT" => Some(Self::Segment),
1010            "PLAN_ELEMENT_KIND_MILESTONE" => Some(Self::Milestone),
1011            "PLAN_ELEMENT_KIND_ASSET_GROUP" => Some(Self::AssetGroup),
1012            "PLAN_ELEMENT_KIND_CONSTRAINT" => Some(Self::Constraint),
1013            "PLAN_ELEMENT_KIND_RESOURCE" => Some(Self::Resource),
1014            _ => None,
1015        }
1016    }
1017}
1018#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1019#[repr(i32)]
1020pub enum PlanError {
1021    PlanNotFound = 0,
1022    BranchOrCommitNotFound = 1,
1023    CommitConflict = 2,
1024    PlanArchived = 3,
1025}
1026impl PlanError {
1027    /// String value of the enum field names used in the ProtoBuf definition.
1028    ///
1029    /// The values are not transformed in any way and thus are considered stable
1030    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1031    pub fn as_str_name(&self) -> &'static str {
1032        match self {
1033            Self::PlanNotFound => "PLAN_ERROR_PLAN_NOT_FOUND",
1034            Self::BranchOrCommitNotFound => "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND",
1035            Self::CommitConflict => "PLAN_ERROR_COMMIT_CONFLICT",
1036            Self::PlanArchived => "PLAN_ERROR_PLAN_ARCHIVED",
1037        }
1038    }
1039    /// Creates an enum from field names used in the ProtoBuf definition.
1040    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1041        match value {
1042            "PLAN_ERROR_PLAN_NOT_FOUND" => Some(Self::PlanNotFound),
1043            "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND" => Some(Self::BranchOrCommitNotFound),
1044            "PLAN_ERROR_COMMIT_CONFLICT" => Some(Self::CommitConflict),
1045            "PLAN_ERROR_PLAN_ARCHIVED" => Some(Self::PlanArchived),
1046            _ => None,
1047        }
1048    }
1049}
1050/// Generated client implementations.
1051pub mod plan_service_client {
1052    #![allow(
1053        unused_variables,
1054        dead_code,
1055        missing_docs,
1056        clippy::wildcard_imports,
1057        clippy::let_unit_value,
1058    )]
1059    use tonic::codegen::*;
1060    use tonic::codegen::http::Uri;
1061    #[derive(Debug, Clone)]
1062    pub struct PlanServiceClient<T> {
1063        inner: tonic::client::Grpc<T>,
1064    }
1065    impl PlanServiceClient<tonic::transport::Channel> {
1066        /// Attempt to create a new client by connecting to a given endpoint.
1067        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
1068        where
1069            D: TryInto<tonic::transport::Endpoint>,
1070            D::Error: Into<StdError>,
1071        {
1072            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
1073            Ok(Self::new(conn))
1074        }
1075    }
1076    impl<T> PlanServiceClient<T>
1077    where
1078        T: tonic::client::GrpcService<tonic::body::Body>,
1079        T::Error: Into<StdError>,
1080        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
1081        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
1082    {
1083        pub fn new(inner: T) -> Self {
1084            let inner = tonic::client::Grpc::new(inner);
1085            Self { inner }
1086        }
1087        pub fn with_origin(inner: T, origin: Uri) -> Self {
1088            let inner = tonic::client::Grpc::with_origin(inner, origin);
1089            Self { inner }
1090        }
1091        pub fn with_interceptor<F>(
1092            inner: T,
1093            interceptor: F,
1094        ) -> PlanServiceClient<InterceptedService<T, F>>
1095        where
1096            F: tonic::service::Interceptor,
1097            T::ResponseBody: Default,
1098            T: tonic::codegen::Service<
1099                http::Request<tonic::body::Body>,
1100                Response = http::Response<
1101                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
1102                >,
1103            >,
1104            <T as tonic::codegen::Service<
1105                http::Request<tonic::body::Body>,
1106            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
1107        {
1108            PlanServiceClient::new(InterceptedService::new(inner, interceptor))
1109        }
1110        /// Compress requests with the given encoding.
1111        ///
1112        /// This requires the server to support it otherwise it might respond with an
1113        /// error.
1114        #[must_use]
1115        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
1116            self.inner = self.inner.send_compressed(encoding);
1117            self
1118        }
1119        /// Enable decompressing responses.
1120        #[must_use]
1121        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
1122            self.inner = self.inner.accept_compressed(encoding);
1123            self
1124        }
1125        /// Limits the maximum size of a decoded message.
1126        ///
1127        /// Default: `4MB`
1128        #[must_use]
1129        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
1130            self.inner = self.inner.max_decoding_message_size(limit);
1131            self
1132        }
1133        /// Limits the maximum size of an encoded message.
1134        ///
1135        /// Default: `usize::MAX`
1136        #[must_use]
1137        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
1138            self.inner = self.inner.max_encoding_message_size(limit);
1139            self
1140        }
1141        pub async fn create_plan(
1142            &mut self,
1143            request: impl tonic::IntoRequest<super::CreatePlanRequest>,
1144        ) -> std::result::Result<
1145            tonic::Response<super::CreatePlanResponse>,
1146            tonic::Status,
1147        > {
1148            self.inner
1149                .ready()
1150                .await
1151                .map_err(|e| {
1152                    tonic::Status::unknown(
1153                        format!("Service was not ready: {}", e.into()),
1154                    )
1155                })?;
1156            let codec = tonic::codec::ProstCodec::default();
1157            let path = http::uri::PathAndQuery::from_static(
1158                "/nominal.plan.v1.PlanService/CreatePlan",
1159            );
1160            let mut req = request.into_request();
1161            req.extensions_mut()
1162                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlan"));
1163            self.inner.unary(req, path, codec).await
1164        }
1165        pub async fn get_plan(
1166            &mut self,
1167            request: impl tonic::IntoRequest<super::GetPlanRequest>,
1168        ) -> std::result::Result<
1169            tonic::Response<super::GetPlanResponse>,
1170            tonic::Status,
1171        > {
1172            self.inner
1173                .ready()
1174                .await
1175                .map_err(|e| {
1176                    tonic::Status::unknown(
1177                        format!("Service was not ready: {}", e.into()),
1178                    )
1179                })?;
1180            let codec = tonic::codec::ProstCodec::default();
1181            let path = http::uri::PathAndQuery::from_static(
1182                "/nominal.plan.v1.PlanService/GetPlan",
1183            );
1184            let mut req = request.into_request();
1185            req.extensions_mut()
1186                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "GetPlan"));
1187            self.inner.unary(req, path, codec).await
1188        }
1189        pub async fn batch_get_plans(
1190            &mut self,
1191            request: impl tonic::IntoRequest<super::BatchGetPlansRequest>,
1192        ) -> std::result::Result<
1193            tonic::Response<super::BatchGetPlansResponse>,
1194            tonic::Status,
1195        > {
1196            self.inner
1197                .ready()
1198                .await
1199                .map_err(|e| {
1200                    tonic::Status::unknown(
1201                        format!("Service was not ready: {}", e.into()),
1202                    )
1203                })?;
1204            let codec = tonic::codec::ProstCodec::default();
1205            let path = http::uri::PathAndQuery::from_static(
1206                "/nominal.plan.v1.PlanService/BatchGetPlans",
1207            );
1208            let mut req = request.into_request();
1209            req.extensions_mut()
1210                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "BatchGetPlans"));
1211            self.inner.unary(req, path, codec).await
1212        }
1213        pub async fn create_plan_commit(
1214            &mut self,
1215            request: impl tonic::IntoRequest<super::CreatePlanCommitRequest>,
1216        ) -> std::result::Result<
1217            tonic::Response<super::CreatePlanCommitResponse>,
1218            tonic::Status,
1219        > {
1220            self.inner
1221                .ready()
1222                .await
1223                .map_err(|e| {
1224                    tonic::Status::unknown(
1225                        format!("Service was not ready: {}", e.into()),
1226                    )
1227                })?;
1228            let codec = tonic::codec::ProstCodec::default();
1229            let path = http::uri::PathAndQuery::from_static(
1230                "/nominal.plan.v1.PlanService/CreatePlanCommit",
1231            );
1232            let mut req = request.into_request();
1233            req.extensions_mut()
1234                .insert(
1235                    GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlanCommit"),
1236                );
1237            self.inner.unary(req, path, codec).await
1238        }
1239        pub async fn update_plan_metadata(
1240            &mut self,
1241            request: impl tonic::IntoRequest<super::UpdatePlanMetadataRequest>,
1242        ) -> std::result::Result<
1243            tonic::Response<super::UpdatePlanMetadataResponse>,
1244            tonic::Status,
1245        > {
1246            self.inner
1247                .ready()
1248                .await
1249                .map_err(|e| {
1250                    tonic::Status::unknown(
1251                        format!("Service was not ready: {}", e.into()),
1252                    )
1253                })?;
1254            let codec = tonic::codec::ProstCodec::default();
1255            let path = http::uri::PathAndQuery::from_static(
1256                "/nominal.plan.v1.PlanService/UpdatePlanMetadata",
1257            );
1258            let mut req = request.into_request();
1259            req.extensions_mut()
1260                .insert(
1261                    GrpcMethod::new("nominal.plan.v1.PlanService", "UpdatePlanMetadata"),
1262                );
1263            self.inner.unary(req, path, codec).await
1264        }
1265        pub async fn search_plans(
1266            &mut self,
1267            request: impl tonic::IntoRequest<super::SearchPlansRequest>,
1268        ) -> std::result::Result<
1269            tonic::Response<super::SearchPlansResponse>,
1270            tonic::Status,
1271        > {
1272            self.inner
1273                .ready()
1274                .await
1275                .map_err(|e| {
1276                    tonic::Status::unknown(
1277                        format!("Service was not ready: {}", e.into()),
1278                    )
1279                })?;
1280            let codec = tonic::codec::ProstCodec::default();
1281            let path = http::uri::PathAndQuery::from_static(
1282                "/nominal.plan.v1.PlanService/SearchPlans",
1283            );
1284            let mut req = request.into_request();
1285            req.extensions_mut()
1286                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "SearchPlans"));
1287            self.inner.unary(req, path, codec).await
1288        }
1289        pub async fn validate_plan(
1290            &mut self,
1291            request: impl tonic::IntoRequest<super::ValidatePlanRequest>,
1292        ) -> std::result::Result<
1293            tonic::Response<super::ValidatePlanResponse>,
1294            tonic::Status,
1295        > {
1296            self.inner
1297                .ready()
1298                .await
1299                .map_err(|e| {
1300                    tonic::Status::unknown(
1301                        format!("Service was not ready: {}", e.into()),
1302                    )
1303                })?;
1304            let codec = tonic::codec::ProstCodec::default();
1305            let path = http::uri::PathAndQuery::from_static(
1306                "/nominal.plan.v1.PlanService/ValidatePlan",
1307            );
1308            let mut req = request.into_request();
1309            req.extensions_mut()
1310                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "ValidatePlan"));
1311            self.inner.unary(req, path, codec).await
1312        }
1313        pub async fn list_plan_asset_group_summaries(
1314            &mut self,
1315            request: impl tonic::IntoRequest<super::ListPlanAssetGroupSummariesRequest>,
1316        ) -> std::result::Result<
1317            tonic::Response<super::ListPlanAssetGroupSummariesResponse>,
1318            tonic::Status,
1319        > {
1320            self.inner
1321                .ready()
1322                .await
1323                .map_err(|e| {
1324                    tonic::Status::unknown(
1325                        format!("Service was not ready: {}", e.into()),
1326                    )
1327                })?;
1328            let codec = tonic::codec::ProstCodec::default();
1329            let path = http::uri::PathAndQuery::from_static(
1330                "/nominal.plan.v1.PlanService/ListPlanAssetGroupSummaries",
1331            );
1332            let mut req = request.into_request();
1333            req.extensions_mut()
1334                .insert(
1335                    GrpcMethod::new(
1336                        "nominal.plan.v1.PlanService",
1337                        "ListPlanAssetGroupSummaries",
1338                    ),
1339                );
1340            self.inner.unary(req, path, codec).await
1341        }
1342    }
1343}