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}
20#[derive(Clone, PartialEq, ::prost::Message)]
21pub struct PlanMetadata {
22    #[prost(string, tag = "1")]
23    pub title: ::prost::alloc::string::String,
24    #[prost(string, tag = "2")]
25    pub description: ::prost::alloc::string::String,
26    #[prost(string, repeated, tag = "3")]
27    pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
28    #[prost(map = "string, string", tag = "4")]
29    pub properties: ::std::collections::HashMap<
30        ::prost::alloc::string::String,
31        ::prost::alloc::string::String,
32    >,
33    #[prost(bool, tag = "5")]
34    pub is_archived: bool,
35    #[prost(bool, optional, tag = "6")]
36    pub is_published: ::core::option::Option<bool>,
37    #[prost(string, tag = "7")]
38    pub created_by: ::prost::alloc::string::String,
39    #[prost(message, optional, tag = "8")]
40    pub created_at: ::core::option::Option<
41        super::super::super::google::protobuf::Timestamp,
42    >,
43    #[prost(message, optional, tag = "9")]
44    pub updated_at: ::core::option::Option<
45        super::super::super::google::protobuf::Timestamp,
46    >,
47    #[prost(message, optional, tag = "10")]
48    pub edited_at: ::core::option::Option<
49        super::super::super::google::protobuf::Timestamp,
50    >,
51    #[prost(string, tag = "11")]
52    pub workspace_rid: ::prost::alloc::string::String,
53    #[prost(string, tag = "12")]
54    pub updated_by: ::prost::alloc::string::String,
55}
56#[derive(Clone, PartialEq, ::prost::Message)]
57pub struct PlanContent {
58    #[prost(oneof = "plan_content::PlanContent", tags = "1")]
59    pub plan_content: ::core::option::Option<plan_content::PlanContent>,
60}
61/// Nested message and enum types in `PlanContent`.
62pub mod plan_content {
63    #[derive(Clone, PartialEq, ::prost::Oneof)]
64    pub enum PlanContent {
65        #[prost(message, tag = "1")]
66        V1(super::PlanContentV1),
67    }
68}
69#[derive(Clone, PartialEq, ::prost::Message)]
70pub struct PlanContentV1 {
71    #[prost(message, optional, tag = "1")]
72    pub start_date: ::core::option::Option<
73        super::super::super::google::protobuf::Timestamp,
74    >,
75    #[prost(message, optional, tag = "2")]
76    pub end_date: ::core::option::Option<
77        super::super::super::google::protobuf::Timestamp,
78    >,
79    #[prost(message, repeated, tag = "3")]
80    pub objectives: ::prost::alloc::vec::Vec<Objective>,
81    #[prost(message, repeated, tag = "4")]
82    pub events: ::prost::alloc::vec::Vec<Event>,
83    #[prost(message, repeated, tag = "5")]
84    pub segments: ::prost::alloc::vec::Vec<Segment>,
85    #[prost(message, repeated, tag = "6")]
86    pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
87    #[prost(message, repeated, tag = "7")]
88    pub milestones: ::prost::alloc::vec::Vec<Milestone>,
89}
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct Milestone {
92    #[prost(string, tag = "1")]
93    pub id: ::prost::alloc::string::String,
94    #[prost(string, tag = "2")]
95    pub name: ::prost::alloc::string::String,
96    #[prost(string, optional, tag = "3")]
97    pub description: ::core::option::Option<::prost::alloc::string::String>,
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct Event {
101    #[prost(string, tag = "1")]
102    pub id: ::prost::alloc::string::String,
103    #[prost(string, tag = "2")]
104    pub name: ::prost::alloc::string::String,
105    #[prost(string, optional, tag = "3")]
106    pub description: ::core::option::Option<::prost::alloc::string::String>,
107    #[prost(message, optional, tag = "4")]
108    pub details: ::core::option::Option<EventDetails>,
109}
110#[derive(Clone, PartialEq, ::prost::Message)]
111pub struct EventDetails {
112    #[prost(oneof = "event_details::EventDetails", tags = "1")]
113    pub event_details: ::core::option::Option<event_details::EventDetails>,
114}
115/// Nested message and enum types in `EventDetails`.
116pub mod event_details {
117    #[derive(Clone, PartialEq, ::prost::Oneof)]
118    pub enum EventDetails {
119        #[prost(message, tag = "1")]
120        Single(super::SingleEvent),
121    }
122}
123#[derive(Clone, PartialEq, ::prost::Message)]
124pub struct SingleEvent {
125    #[prost(message, optional, tag = "1")]
126    pub start_date: ::core::option::Option<
127        super::super::super::google::protobuf::Timestamp,
128    >,
129    #[prost(message, optional, tag = "2")]
130    pub end_date: ::core::option::Option<
131        super::super::super::google::protobuf::Timestamp,
132    >,
133    #[prost(string, optional, tag = "3")]
134    pub segment_id: ::core::option::Option<::prost::alloc::string::String>,
135    #[prost(string, repeated, tag = "4")]
136    pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
137    #[prost(message, optional, tag = "5")]
138    pub status: ::core::option::Option<EventStatus>,
139}
140#[derive(Clone, PartialEq, ::prost::Message)]
141pub struct EventStatus {
142    #[prost(oneof = "event_status::EventStatus", tags = "1, 2, 3, 4, 5")]
143    pub event_status: ::core::option::Option<event_status::EventStatus>,
144}
145/// Nested message and enum types in `EventStatus`.
146pub mod event_status {
147    #[derive(Clone, PartialEq, ::prost::Oneof)]
148    pub enum EventStatus {
149        #[prost(message, tag = "1")]
150        Created(super::CreatedEvent),
151        #[prost(message, tag = "2")]
152        Finalized(super::FinalizedEvent),
153        #[prost(message, tag = "3")]
154        InProgress(super::InProgressEvent),
155        #[prost(message, tag = "4")]
156        Completed(super::CompletedEvent),
157        #[prost(message, tag = "5")]
158        Cancelled(super::CancelledEvent),
159    }
160}
161#[derive(Clone, Copy, PartialEq, ::prost::Message)]
162pub struct CreatedEvent {}
163#[derive(Clone, Copy, PartialEq, ::prost::Message)]
164pub struct FinalizedEvent {}
165#[derive(Clone, Copy, PartialEq, ::prost::Message)]
166pub struct InProgressEvent {}
167#[derive(Clone, PartialEq, ::prost::Message)]
168pub struct CompletedEvent {
169    #[prost(string, optional, tag = "1")]
170    pub notes: ::core::option::Option<::prost::alloc::string::String>,
171}
172#[derive(Clone, PartialEq, ::prost::Message)]
173pub struct CancelledEvent {
174    #[prost(string, tag = "1")]
175    pub reason: ::prost::alloc::string::String,
176    #[prost(string, optional, tag = "2")]
177    pub notes: ::core::option::Option<::prost::alloc::string::String>,
178}
179#[derive(Clone, PartialEq, ::prost::Message)]
180pub struct Objective {
181    #[prost(string, tag = "1")]
182    pub id: ::prost::alloc::string::String,
183    #[prost(string, tag = "2")]
184    pub name: ::prost::alloc::string::String,
185    #[prost(string, tag = "3")]
186    pub creator: ::prost::alloc::string::String,
187    #[prost(message, optional, tag = "4")]
188    pub created_at: ::core::option::Option<
189        super::super::super::google::protobuf::Timestamp,
190    >,
191    #[prost(enumeration = "super::super::types::Priority", tag = "5")]
192    pub priority: i32,
193    #[prost(string, repeated, tag = "6")]
194    pub milestone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
195    #[prost(string, optional, tag = "7")]
196    pub description: ::core::option::Option<::prost::alloc::string::String>,
197    #[prost(message, optional, tag = "8")]
198    pub details: ::core::option::Option<ObjectiveDetails>,
199    #[prost(message, optional, tag = "9")]
200    pub status: ::core::option::Option<ObjectiveStatus>,
201}
202#[derive(Clone, PartialEq, ::prost::Message)]
203pub struct ObjectiveStatus {
204    #[prost(oneof = "objective_status::ObjectiveStatus", tags = "1, 2, 3, 4, 5")]
205    pub objective_status: ::core::option::Option<objective_status::ObjectiveStatus>,
206}
207/// Nested message and enum types in `ObjectiveStatus`.
208pub mod objective_status {
209    #[derive(Clone, PartialEq, ::prost::Oneof)]
210    pub enum ObjectiveStatus {
211        #[prost(message, tag = "1")]
212        Draft(super::DraftObjective),
213        #[prost(message, tag = "2")]
214        Proposed(super::ProposedObjective),
215        #[prost(message, tag = "3")]
216        Finalized(super::FinalizedObjective),
217        #[prost(message, tag = "4")]
218        Completed(super::CompletedObjective),
219        #[prost(message, tag = "5")]
220        Rejected(super::RejectedObjective),
221    }
222}
223#[derive(Clone, Copy, PartialEq, ::prost::Message)]
224pub struct DraftObjective {}
225#[derive(Clone, Copy, PartialEq, ::prost::Message)]
226pub struct ProposedObjective {}
227#[derive(Clone, Copy, PartialEq, ::prost::Message)]
228pub struct FinalizedObjective {}
229#[derive(Clone, PartialEq, ::prost::Message)]
230pub struct CompletedObjective {
231    #[prost(message, optional, tag = "1")]
232    pub disposition: ::core::option::Option<ObjectiveDisposition>,
233}
234#[derive(Clone, PartialEq, ::prost::Message)]
235pub struct RejectedObjective {
236    #[prost(string, tag = "1")]
237    pub reason: ::prost::alloc::string::String,
238}
239#[derive(Clone, PartialEq, ::prost::Message)]
240pub struct ObjectiveDisposition {
241    #[prost(oneof = "objective_disposition::ObjectiveDisposition", tags = "1, 2")]
242    pub objective_disposition: ::core::option::Option<
243        objective_disposition::ObjectiveDisposition,
244    >,
245}
246/// Nested message and enum types in `ObjectiveDisposition`.
247pub mod objective_disposition {
248    #[derive(Clone, PartialEq, ::prost::Oneof)]
249    pub enum ObjectiveDisposition {
250        #[prost(message, tag = "1")]
251        Successful(super::SuccessfulObjective),
252        #[prost(message, tag = "2")]
253        Failed(super::FailedObjective),
254    }
255}
256#[derive(Clone, PartialEq, ::prost::Message)]
257pub struct SuccessfulObjective {
258    #[prost(string, optional, tag = "1")]
259    pub notes: ::core::option::Option<::prost::alloc::string::String>,
260}
261#[derive(Clone, PartialEq, ::prost::Message)]
262pub struct FailedObjective {
263    #[prost(string, tag = "1")]
264    pub reason: ::prost::alloc::string::String,
265    #[prost(string, optional, tag = "2")]
266    pub notes: ::core::option::Option<::prost::alloc::string::String>,
267}
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct ObjectiveDetails {
270    #[prost(oneof = "objective_details::ObjectiveDetails", tags = "1")]
271    pub objective_details: ::core::option::Option<objective_details::ObjectiveDetails>,
272}
273/// Nested message and enum types in `ObjectiveDetails`.
274pub mod objective_details {
275    #[derive(Clone, PartialEq, ::prost::Oneof)]
276    pub enum ObjectiveDetails {
277        #[prost(message, tag = "1")]
278        Simple(super::SimpleObjective),
279    }
280}
281#[derive(Clone, PartialEq, ::prost::Message)]
282pub struct SimpleObjective {
283    #[prost(message, repeated, tag = "1")]
284    pub resources: ::prost::alloc::vec::Vec<Resource>,
285}
286#[derive(Clone, PartialEq, ::prost::Message)]
287pub struct Resource {
288    #[prost(string, tag = "1")]
289    pub name: ::prost::alloc::string::String,
290    #[prost(string, optional, tag = "2")]
291    pub description: ::core::option::Option<::prost::alloc::string::String>,
292    #[prost(int32, optional, tag = "3")]
293    pub count: ::core::option::Option<i32>,
294    #[prost(message, optional, tag = "4")]
295    pub candidate_assets: ::core::option::Option<CandidateAssetGroup>,
296    #[prost(string, repeated, tag = "5")]
297    pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
298}
299#[derive(Clone, PartialEq, ::prost::Message)]
300pub struct CandidateAssetGroup {
301    #[prost(oneof = "candidate_asset_group::CandidateAssetGroup", tags = "1, 2")]
302    pub candidate_asset_group: ::core::option::Option<
303        candidate_asset_group::CandidateAssetGroup,
304    >,
305}
306/// Nested message and enum types in `CandidateAssetGroup`.
307pub mod candidate_asset_group {
308    #[derive(Clone, PartialEq, ::prost::Oneof)]
309    pub enum CandidateAssetGroup {
310        #[prost(message, tag = "1")]
311        Sources(super::AssetSourceList),
312        #[prost(string, tag = "2")]
313        AssetGroupId(::prost::alloc::string::String),
314    }
315}
316#[derive(Clone, PartialEq, ::prost::Message)]
317pub struct AssetSourceList {
318    #[prost(message, repeated, tag = "1")]
319    pub sources: ::prost::alloc::vec::Vec<AssetSource>,
320}
321#[derive(Clone, PartialEq, ::prost::Message)]
322pub struct AssetGroup {
323    #[prost(string, tag = "1")]
324    pub id: ::prost::alloc::string::String,
325    #[prost(string, tag = "2")]
326    pub name: ::prost::alloc::string::String,
327    #[prost(string, optional, tag = "3")]
328    pub description: ::core::option::Option<::prost::alloc::string::String>,
329    #[prost(message, repeated, tag = "4")]
330    pub sources: ::prost::alloc::vec::Vec<AssetSource>,
331}
332#[derive(Clone, PartialEq, ::prost::Message)]
333pub struct AssetSource {
334    #[prost(oneof = "asset_source::AssetSource", tags = "1, 2")]
335    pub asset_source: ::core::option::Option<asset_source::AssetSource>,
336}
337/// Nested message and enum types in `AssetSource`.
338pub mod asset_source {
339    #[derive(Clone, PartialEq, ::prost::Oneof)]
340    pub enum AssetSource {
341        #[prost(message, tag = "1")]
342        AssetSearch(super::super::super::asset::v2::SearchAssetsQuery),
343        #[prost(string, tag = "2")]
344        AssetRid(::prost::alloc::string::String),
345    }
346}
347#[derive(Clone, PartialEq, ::prost::Message)]
348pub struct Segment {
349    #[prost(string, tag = "1")]
350    pub id: ::prost::alloc::string::String,
351    #[prost(string, tag = "2")]
352    pub name: ::prost::alloc::string::String,
353    #[prost(message, optional, tag = "3")]
354    pub start_date: ::core::option::Option<
355        super::super::super::google::protobuf::Timestamp,
356    >,
357    #[prost(message, optional, tag = "4")]
358    pub end_date: ::core::option::Option<
359        super::super::super::google::protobuf::Timestamp,
360    >,
361    #[prost(message, optional, tag = "5")]
362    pub status: ::core::option::Option<SegmentStatus>,
363}
364#[derive(Clone, Copy, PartialEq, ::prost::Message)]
365pub struct SegmentStatus {
366    #[prost(oneof = "segment_status::SegmentStatus", tags = "1, 2")]
367    pub segment_status: ::core::option::Option<segment_status::SegmentStatus>,
368}
369/// Nested message and enum types in `SegmentStatus`.
370pub mod segment_status {
371    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
372    pub enum SegmentStatus {
373        #[prost(message, tag = "1")]
374        Draft(super::DraftSegment),
375        #[prost(message, tag = "2")]
376        Finalized(super::FinalizedSegment),
377    }
378}
379#[derive(Clone, Copy, PartialEq, ::prost::Message)]
380pub struct DraftSegment {}
381#[derive(Clone, Copy, PartialEq, ::prost::Message)]
382pub struct FinalizedSegment {}
383#[derive(Clone, PartialEq, ::prost::Message)]
384pub struct CreatePlanRequest {
385    #[prost(message, optional, tag = "1")]
386    pub plan: ::core::option::Option<Plan>,
387    #[prost(string, tag = "2")]
388    pub message: ::prost::alloc::string::String,
389}
390#[derive(Clone, PartialEq, ::prost::Message)]
391pub struct CreatePlanResponse {
392    #[prost(message, optional, tag = "1")]
393    pub plan: ::core::option::Option<Plan>,
394}
395#[derive(Clone, PartialEq, ::prost::Message)]
396pub struct GetPlanRequest {
397    #[prost(string, tag = "1")]
398    pub plan_rid: ::prost::alloc::string::String,
399    #[prost(message, optional, tag = "2")]
400    pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
401}
402#[derive(Clone, PartialEq, ::prost::Message)]
403pub struct GetPlanResponse {
404    #[prost(message, optional, tag = "1")]
405    pub plan: ::core::option::Option<Plan>,
406}
407#[derive(Clone, PartialEq, ::prost::Message)]
408pub struct BatchGetPlansRequest {
409    #[prost(string, repeated, tag = "1")]
410    pub plan_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
411}
412#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct BatchGetPlansResponse {
414    #[prost(message, repeated, tag = "1")]
415    pub plans: ::prost::alloc::vec::Vec<Plan>,
416}
417#[derive(Clone, PartialEq, ::prost::Message)]
418pub struct CreatePlanCommitRequest {
419    #[prost(string, tag = "1")]
420    pub plan_rid: ::prost::alloc::string::String,
421    #[prost(message, optional, tag = "2")]
422    pub content: ::core::option::Option<PlanContent>,
423    #[prost(string, optional, tag = "3")]
424    pub branch: ::core::option::Option<::prost::alloc::string::String>,
425    #[prost(string, tag = "4")]
426    pub message: ::prost::alloc::string::String,
427    #[prost(bool, tag = "5")]
428    pub is_working_state: bool,
429    #[prost(string, optional, tag = "6")]
430    pub expected_latest_commit: ::core::option::Option<::prost::alloc::string::String>,
431}
432#[derive(Clone, PartialEq, ::prost::Message)]
433pub struct CreatePlanCommitResponse {
434    #[prost(message, optional, tag = "1")]
435    pub plan: ::core::option::Option<Plan>,
436}
437#[derive(Clone, PartialEq, ::prost::Message)]
438pub struct UpdatePlanMetadataRequest {
439    #[prost(string, tag = "1")]
440    pub plan_rid: ::prost::alloc::string::String,
441    #[prost(string, optional, tag = "2")]
442    pub title: ::core::option::Option<::prost::alloc::string::String>,
443    #[prost(string, optional, tag = "3")]
444    pub description: ::core::option::Option<::prost::alloc::string::String>,
445    #[prost(message, optional, tag = "4")]
446    pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
447    #[prost(message, optional, tag = "5")]
448    pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
449    #[prost(bool, optional, tag = "6")]
450    pub is_archived: ::core::option::Option<bool>,
451    #[prost(bool, optional, tag = "7")]
452    pub is_published: ::core::option::Option<bool>,
453}
454#[derive(Clone, PartialEq, ::prost::Message)]
455pub struct UpdatePlanMetadataResponse {
456    #[prost(message, optional, tag = "1")]
457    pub metadata: ::core::option::Option<PlanMetadata>,
458}
459#[derive(Clone, PartialEq, ::prost::Message)]
460pub struct SearchPlansQuery {
461    #[prost(
462        oneof = "search_plans_query::Query",
463        tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13"
464    )]
465    pub query: ::core::option::Option<search_plans_query::Query>,
466}
467/// Nested message and enum types in `SearchPlansQuery`.
468pub mod search_plans_query {
469    #[derive(Clone, PartialEq, ::prost::Oneof)]
470    pub enum Query {
471        #[prost(message, tag = "1")]
472        And(super::SearchPlansQueryList),
473        #[prost(message, tag = "2")]
474        Or(super::SearchPlansQueryList),
475        #[prost(message, tag = "3")]
476        Not(::prost::alloc::boxed::Box<super::SearchPlansQuery>),
477        #[prost(string, tag = "4")]
478        ExactMatch(::prost::alloc::string::String),
479        #[prost(string, tag = "5")]
480        SearchText(::prost::alloc::string::String),
481        #[prost(message, tag = "6")]
482        Labels(super::super::super::types::LabelsFilter),
483        #[prost(message, tag = "7")]
484        Properties(super::super::super::types::PropertiesFilter),
485        #[prost(string, tag = "8")]
486        CreatedBy(::prost::alloc::string::String),
487        #[prost(bool, tag = "9")]
488        IsArchived(bool),
489        #[prost(bool, tag = "10")]
490        IsPublished(bool),
491        #[prost(bool, tag = "11")]
492        AuthorIsCurrentUser(bool),
493        #[prost(message, tag = "12")]
494        AuthorRids(super::UserRidList),
495        #[prost(string, tag = "13")]
496        WorkspaceRid(::prost::alloc::string::String),
497    }
498}
499#[derive(Clone, PartialEq, ::prost::Message)]
500pub struct SearchPlansQueryList {
501    #[prost(message, repeated, tag = "1")]
502    pub queries: ::prost::alloc::vec::Vec<SearchPlansQuery>,
503}
504#[derive(Clone, PartialEq, ::prost::Message)]
505pub struct UserRidList {
506    #[prost(string, repeated, tag = "1")]
507    pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
508}
509#[derive(Clone, Copy, PartialEq, ::prost::Message)]
510pub struct PlanSortOptions {
511    #[prost(enumeration = "PlanSortField", tag = "1")]
512    pub field: i32,
513    #[prost(bool, tag = "2")]
514    pub is_descending: bool,
515}
516#[derive(Clone, PartialEq, ::prost::Message)]
517pub struct SearchPlansRequest {
518    #[prost(message, optional, tag = "1")]
519    pub query: ::core::option::Option<SearchPlansQuery>,
520    #[prost(message, optional, tag = "2")]
521    pub sort: ::core::option::Option<PlanSortOptions>,
522    #[prost(string, optional, tag = "3")]
523    pub page_token: ::core::option::Option<::prost::alloc::string::String>,
524    #[prost(int32, optional, tag = "4")]
525    pub page_size: ::core::option::Option<i32>,
526}
527#[derive(Clone, PartialEq, ::prost::Message)]
528pub struct SearchPlansResponse {
529    #[prost(message, repeated, tag = "1")]
530    pub results: ::prost::alloc::vec::Vec<PlanSummary>,
531    #[prost(string, optional, tag = "2")]
532    pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
533}
534#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
535#[repr(i32)]
536pub enum PlanSortField {
537    Unspecified = 0,
538    Name = 1,
539    CreatedAt = 2,
540    EditedAt = 3,
541}
542impl PlanSortField {
543    /// String value of the enum field names used in the ProtoBuf definition.
544    ///
545    /// The values are not transformed in any way and thus are considered stable
546    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
547    pub fn as_str_name(&self) -> &'static str {
548        match self {
549            Self::Unspecified => "PLAN_SORT_FIELD_UNSPECIFIED",
550            Self::Name => "NAME",
551            Self::CreatedAt => "CREATED_AT",
552            Self::EditedAt => "EDITED_AT",
553        }
554    }
555    /// Creates an enum from field names used in the ProtoBuf definition.
556    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
557        match value {
558            "PLAN_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
559            "NAME" => Some(Self::Name),
560            "CREATED_AT" => Some(Self::CreatedAt),
561            "EDITED_AT" => Some(Self::EditedAt),
562            _ => None,
563        }
564    }
565}
566#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
567#[repr(i32)]
568pub enum PlanError {
569    PlanNotFound = 0,
570    BranchOrCommitNotFound = 1,
571    CommitConflict = 2,
572    PlanArchived = 3,
573}
574impl PlanError {
575    /// String value of the enum field names used in the ProtoBuf definition.
576    ///
577    /// The values are not transformed in any way and thus are considered stable
578    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
579    pub fn as_str_name(&self) -> &'static str {
580        match self {
581            Self::PlanNotFound => "PLAN_ERROR_PLAN_NOT_FOUND",
582            Self::BranchOrCommitNotFound => "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND",
583            Self::CommitConflict => "PLAN_ERROR_COMMIT_CONFLICT",
584            Self::PlanArchived => "PLAN_ERROR_PLAN_ARCHIVED",
585        }
586    }
587    /// Creates an enum from field names used in the ProtoBuf definition.
588    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
589        match value {
590            "PLAN_ERROR_PLAN_NOT_FOUND" => Some(Self::PlanNotFound),
591            "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND" => Some(Self::BranchOrCommitNotFound),
592            "PLAN_ERROR_COMMIT_CONFLICT" => Some(Self::CommitConflict),
593            "PLAN_ERROR_PLAN_ARCHIVED" => Some(Self::PlanArchived),
594            _ => None,
595        }
596    }
597}
598/// Generated client implementations.
599pub mod plan_service_client {
600    #![allow(
601        unused_variables,
602        dead_code,
603        missing_docs,
604        clippy::wildcard_imports,
605        clippy::let_unit_value,
606    )]
607    use tonic::codegen::*;
608    use tonic::codegen::http::Uri;
609    #[derive(Debug, Clone)]
610    pub struct PlanServiceClient<T> {
611        inner: tonic::client::Grpc<T>,
612    }
613    impl PlanServiceClient<tonic::transport::Channel> {
614        /// Attempt to create a new client by connecting to a given endpoint.
615        pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
616        where
617            D: TryInto<tonic::transport::Endpoint>,
618            D::Error: Into<StdError>,
619        {
620            let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
621            Ok(Self::new(conn))
622        }
623    }
624    impl<T> PlanServiceClient<T>
625    where
626        T: tonic::client::GrpcService<tonic::body::Body>,
627        T::Error: Into<StdError>,
628        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
629        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
630    {
631        pub fn new(inner: T) -> Self {
632            let inner = tonic::client::Grpc::new(inner);
633            Self { inner }
634        }
635        pub fn with_origin(inner: T, origin: Uri) -> Self {
636            let inner = tonic::client::Grpc::with_origin(inner, origin);
637            Self { inner }
638        }
639        pub fn with_interceptor<F>(
640            inner: T,
641            interceptor: F,
642        ) -> PlanServiceClient<InterceptedService<T, F>>
643        where
644            F: tonic::service::Interceptor,
645            T::ResponseBody: Default,
646            T: tonic::codegen::Service<
647                http::Request<tonic::body::Body>,
648                Response = http::Response<
649                    <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
650                >,
651            >,
652            <T as tonic::codegen::Service<
653                http::Request<tonic::body::Body>,
654            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
655        {
656            PlanServiceClient::new(InterceptedService::new(inner, interceptor))
657        }
658        /// Compress requests with the given encoding.
659        ///
660        /// This requires the server to support it otherwise it might respond with an
661        /// error.
662        #[must_use]
663        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
664            self.inner = self.inner.send_compressed(encoding);
665            self
666        }
667        /// Enable decompressing responses.
668        #[must_use]
669        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
670            self.inner = self.inner.accept_compressed(encoding);
671            self
672        }
673        /// Limits the maximum size of a decoded message.
674        ///
675        /// Default: `4MB`
676        #[must_use]
677        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
678            self.inner = self.inner.max_decoding_message_size(limit);
679            self
680        }
681        /// Limits the maximum size of an encoded message.
682        ///
683        /// Default: `usize::MAX`
684        #[must_use]
685        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
686            self.inner = self.inner.max_encoding_message_size(limit);
687            self
688        }
689        pub async fn create_plan(
690            &mut self,
691            request: impl tonic::IntoRequest<super::CreatePlanRequest>,
692        ) -> std::result::Result<
693            tonic::Response<super::CreatePlanResponse>,
694            tonic::Status,
695        > {
696            self.inner
697                .ready()
698                .await
699                .map_err(|e| {
700                    tonic::Status::unknown(
701                        format!("Service was not ready: {}", e.into()),
702                    )
703                })?;
704            let codec = tonic::codec::ProstCodec::default();
705            let path = http::uri::PathAndQuery::from_static(
706                "/nominal.plan.v1.PlanService/CreatePlan",
707            );
708            let mut req = request.into_request();
709            req.extensions_mut()
710                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlan"));
711            self.inner.unary(req, path, codec).await
712        }
713        pub async fn get_plan(
714            &mut self,
715            request: impl tonic::IntoRequest<super::GetPlanRequest>,
716        ) -> std::result::Result<
717            tonic::Response<super::GetPlanResponse>,
718            tonic::Status,
719        > {
720            self.inner
721                .ready()
722                .await
723                .map_err(|e| {
724                    tonic::Status::unknown(
725                        format!("Service was not ready: {}", e.into()),
726                    )
727                })?;
728            let codec = tonic::codec::ProstCodec::default();
729            let path = http::uri::PathAndQuery::from_static(
730                "/nominal.plan.v1.PlanService/GetPlan",
731            );
732            let mut req = request.into_request();
733            req.extensions_mut()
734                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "GetPlan"));
735            self.inner.unary(req, path, codec).await
736        }
737        pub async fn batch_get_plans(
738            &mut self,
739            request: impl tonic::IntoRequest<super::BatchGetPlansRequest>,
740        ) -> std::result::Result<
741            tonic::Response<super::BatchGetPlansResponse>,
742            tonic::Status,
743        > {
744            self.inner
745                .ready()
746                .await
747                .map_err(|e| {
748                    tonic::Status::unknown(
749                        format!("Service was not ready: {}", e.into()),
750                    )
751                })?;
752            let codec = tonic::codec::ProstCodec::default();
753            let path = http::uri::PathAndQuery::from_static(
754                "/nominal.plan.v1.PlanService/BatchGetPlans",
755            );
756            let mut req = request.into_request();
757            req.extensions_mut()
758                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "BatchGetPlans"));
759            self.inner.unary(req, path, codec).await
760        }
761        pub async fn create_plan_commit(
762            &mut self,
763            request: impl tonic::IntoRequest<super::CreatePlanCommitRequest>,
764        ) -> std::result::Result<
765            tonic::Response<super::CreatePlanCommitResponse>,
766            tonic::Status,
767        > {
768            self.inner
769                .ready()
770                .await
771                .map_err(|e| {
772                    tonic::Status::unknown(
773                        format!("Service was not ready: {}", e.into()),
774                    )
775                })?;
776            let codec = tonic::codec::ProstCodec::default();
777            let path = http::uri::PathAndQuery::from_static(
778                "/nominal.plan.v1.PlanService/CreatePlanCommit",
779            );
780            let mut req = request.into_request();
781            req.extensions_mut()
782                .insert(
783                    GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlanCommit"),
784                );
785            self.inner.unary(req, path, codec).await
786        }
787        pub async fn update_plan_metadata(
788            &mut self,
789            request: impl tonic::IntoRequest<super::UpdatePlanMetadataRequest>,
790        ) -> std::result::Result<
791            tonic::Response<super::UpdatePlanMetadataResponse>,
792            tonic::Status,
793        > {
794            self.inner
795                .ready()
796                .await
797                .map_err(|e| {
798                    tonic::Status::unknown(
799                        format!("Service was not ready: {}", e.into()),
800                    )
801                })?;
802            let codec = tonic::codec::ProstCodec::default();
803            let path = http::uri::PathAndQuery::from_static(
804                "/nominal.plan.v1.PlanService/UpdatePlanMetadata",
805            );
806            let mut req = request.into_request();
807            req.extensions_mut()
808                .insert(
809                    GrpcMethod::new("nominal.plan.v1.PlanService", "UpdatePlanMetadata"),
810                );
811            self.inner.unary(req, path, codec).await
812        }
813        pub async fn search_plans(
814            &mut self,
815            request: impl tonic::IntoRequest<super::SearchPlansRequest>,
816        ) -> std::result::Result<
817            tonic::Response<super::SearchPlansResponse>,
818            tonic::Status,
819        > {
820            self.inner
821                .ready()
822                .await
823                .map_err(|e| {
824                    tonic::Status::unknown(
825                        format!("Service was not ready: {}", e.into()),
826                    )
827                })?;
828            let codec = tonic::codec::ProstCodec::default();
829            let path = http::uri::PathAndQuery::from_static(
830                "/nominal.plan.v1.PlanService/SearchPlans",
831            );
832            let mut req = request.into_request();
833            req.extensions_mut()
834                .insert(GrpcMethod::new("nominal.plan.v1.PlanService", "SearchPlans"));
835            self.inner.unary(req, path, codec).await
836        }
837    }
838}