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