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