#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Plan {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<PlanMetadata>,
#[prost(message, optional, tag = "3")]
pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
#[prost(message, optional, tag = "4")]
pub content: ::core::option::Option<PlanContent>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanSummary {
#[prost(string, tag = "1")]
pub rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub metadata: ::core::option::Option<PlanMetadata>,
#[prost(message, optional, tag = "3")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "5")]
pub earliest_scheduled_start: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "6")]
pub latest_scheduled_end: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanMetadata {
#[prost(string, tag = "1")]
pub title: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub description: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "4")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(bool, tag = "5")]
pub is_archived: bool,
#[prost(bool, optional, tag = "6")]
pub is_published: ::core::option::Option<bool>,
#[prost(string, tag = "7")]
pub created_by: ::prost::alloc::string::String,
#[prost(message, optional, tag = "8")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "9")]
pub updated_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "10")]
pub edited_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, tag = "11")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "12")]
pub updated_by: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanContent {
#[prost(oneof = "plan_content::PlanContent", tags = "1")]
pub plan_content: ::core::option::Option<plan_content::PlanContent>,
}
pub mod plan_content {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PlanContent {
#[prost(message, tag = "1")]
V1(super::PlanContentV1),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanContentV1 {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, repeated, tag = "3")]
pub objectives: ::prost::alloc::vec::Vec<Objective>,
#[prost(message, repeated, tag = "4")]
pub activities: ::prost::alloc::vec::Vec<Activity>,
#[prost(message, repeated, tag = "5")]
pub segments: ::prost::alloc::vec::Vec<Segment>,
#[prost(message, repeated, tag = "6")]
pub asset_groups: ::prost::alloc::vec::Vec<AssetGroup>,
#[prost(message, repeated, tag = "7")]
pub milestones: ::prost::alloc::vec::Vec<Milestone>,
#[prost(message, repeated, tag = "8")]
pub constraints: ::prost::alloc::vec::Vec<Constraint>,
#[prost(string, optional, tag = "9")]
pub timezone: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Milestone {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Activity {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub details: ::core::option::Option<ActivityDetails>,
#[prost(message, optional, tag = "5")]
pub planned_duration: ::core::option::Option<MinuteDuration>,
#[prost(string, repeated, tag = "6")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "7")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "8")]
pub attachment_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "9")]
pub links: ::prost::alloc::vec::Vec<Link>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityDetails {
#[prost(oneof = "activity_details::ActivityDetails", tags = "1")]
pub activity_details: ::core::option::Option<activity_details::ActivityDetails>,
}
pub mod activity_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActivityDetails {
#[prost(message, tag = "1")]
Single(super::SingleActivity),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SingleActivity {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(string, optional, tag = "3")]
pub segment_id: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub objective_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, optional, tag = "5")]
pub status: ::core::option::Option<ActivityStatus>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ActivityStatus {
#[prost(oneof = "activity_status::ActivityStatus", tags = "1, 2, 3, 4, 5")]
pub activity_status: ::core::option::Option<activity_status::ActivityStatus>,
}
pub mod activity_status {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ActivityStatus {
#[prost(message, tag = "1")]
Created(super::CreatedActivity),
#[prost(message, tag = "2")]
Finalized(super::FinalizedActivity),
#[prost(message, tag = "3")]
InProgress(super::InProgressActivity),
#[prost(message, tag = "4")]
Completed(super::CompletedActivity),
#[prost(message, tag = "5")]
Cancelled(super::CancelledActivity),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CreatedActivity {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinalizedActivity {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct InProgressActivity {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletedActivity {
#[prost(string, optional, tag = "1")]
pub notes: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelledActivity {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub notes: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Objective {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub creator: ::prost::alloc::string::String,
#[prost(message, optional, tag = "4")]
pub created_at: ::core::option::Option<
super::super::super::google::protobuf::Timestamp,
>,
#[prost(enumeration = "super::super::types::Priority", tag = "5")]
pub priority: i32,
#[prost(string, repeated, tag = "6")]
pub milestone_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, optional, tag = "7")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub details: ::core::option::Option<ObjectiveDetails>,
#[prost(message, optional, tag = "9")]
pub status: ::core::option::Option<ObjectiveStatus>,
#[prost(message, optional, tag = "10")]
pub planned_duration: ::core::option::Option<MinuteDuration>,
#[prost(string, repeated, tag = "11")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "12")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "13")]
pub attachment_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "14")]
pub links: ::prost::alloc::vec::Vec<Link>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectiveStatus {
#[prost(oneof = "objective_status::ObjectiveStatus", tags = "1, 2, 3, 4, 5")]
pub objective_status: ::core::option::Option<objective_status::ObjectiveStatus>,
}
pub mod objective_status {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ObjectiveStatus {
#[prost(message, tag = "1")]
Draft(super::DraftObjective),
#[prost(message, tag = "2")]
Proposed(super::ProposedObjective),
#[prost(message, tag = "3")]
Finalized(super::FinalizedObjective),
#[prost(message, tag = "4")]
Completed(super::CompletedObjective),
#[prost(message, tag = "5")]
Rejected(super::RejectedObjective),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DraftObjective {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ProposedObjective {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinalizedObjective {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CompletedObjective {
#[prost(message, optional, tag = "1")]
pub disposition: ::core::option::Option<ObjectiveDisposition>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RejectedObjective {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectiveDisposition {
#[prost(oneof = "objective_disposition::ObjectiveDisposition", tags = "1, 2")]
pub objective_disposition: ::core::option::Option<
objective_disposition::ObjectiveDisposition,
>,
}
pub mod objective_disposition {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ObjectiveDisposition {
#[prost(message, tag = "1")]
Successful(super::SuccessfulObjective),
#[prost(message, tag = "2")]
Failed(super::FailedObjective),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SuccessfulObjective {
#[prost(string, optional, tag = "1")]
pub notes: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct FailedObjective {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub notes: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ObjectiveDetails {
#[prost(oneof = "objective_details::ObjectiveDetails", tags = "1")]
pub objective_details: ::core::option::Option<objective_details::ObjectiveDetails>,
}
pub mod objective_details {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum ObjectiveDetails {
#[prost(message, tag = "1")]
Simple(super::SimpleObjective),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SimpleObjective {
#[prost(message, repeated, tag = "1")]
pub resources: ::prost::alloc::vec::Vec<Resource>,
#[prost(string, repeated, tag = "2")]
pub checklist_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "3")]
pub procedure_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Resource {
#[prost(string, tag = "1")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "3")]
pub count: ::core::option::Option<i32>,
#[prost(message, optional, tag = "4")]
pub candidate_assets: ::core::option::Option<CandidateAssetGroup>,
#[prost(string, repeated, tag = "5")]
pub finalized_asset_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "6")]
pub id: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "7")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "8")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CandidateAssetGroup {
#[prost(oneof = "candidate_asset_group::CandidateAssetGroup", tags = "1, 2")]
pub candidate_asset_group: ::core::option::Option<
candidate_asset_group::CandidateAssetGroup,
>,
}
pub mod candidate_asset_group {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum CandidateAssetGroup {
#[prost(message, tag = "1")]
Sources(super::AssetSourceList),
#[prost(string, tag = "2")]
AssetGroupId(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetSourceList {
#[prost(message, repeated, tag = "1")]
pub sources: ::prost::alloc::vec::Vec<AssetSource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetGroup {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "4")]
pub sources: ::prost::alloc::vec::Vec<AssetSource>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AssetSource {
#[prost(oneof = "asset_source::AssetSource", tags = "1, 2")]
pub asset_source: ::core::option::Option<asset_source::AssetSource>,
}
pub mod asset_source {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AssetSource {
#[prost(message, tag = "1")]
AssetSearch(super::super::super::asset::v2::SearchAssetsQuery),
#[prost(string, tag = "2")]
AssetRid(::prost::alloc::string::String),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Segment {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "4")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "5")]
pub status: ::core::option::Option<SegmentStatus>,
#[prost(string, repeated, tag = "6")]
pub labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(map = "string, string", tag = "7")]
pub properties: ::std::collections::HashMap<
::prost::alloc::string::String,
::prost::alloc::string::String,
>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SegmentStatus {
#[prost(oneof = "segment_status::SegmentStatus", tags = "1, 2")]
pub segment_status: ::core::option::Option<segment_status::SegmentStatus>,
}
pub mod segment_status {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum SegmentStatus {
#[prost(message, tag = "1")]
Draft(super::DraftSegment),
#[prost(message, tag = "2")]
Finalized(super::FinalizedSegment),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DraftSegment {}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FinalizedSegment {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Link {
#[prost(string, optional, tag = "1")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub url: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MinuteDuration {
#[prost(message, optional, tag = "1")]
pub value: ::core::option::Option<super::super::types::Duration>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Constraint {
#[prost(string, tag = "1")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "3")]
pub subjects: ::prost::alloc::vec::Vec<ConstraintSubject>,
#[prost(message, optional, tag = "4")]
pub kind: ::core::option::Option<ConstraintKind>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConstraintSubject {
#[prost(oneof = "constraint_subject::Subject", tags = "1, 2, 3, 4, 5, 6, 7")]
pub subject: ::core::option::Option<constraint_subject::Subject>,
}
pub mod constraint_subject {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Subject {
#[prost(string, tag = "1")]
ActivityId(::prost::alloc::string::String),
#[prost(string, tag = "2")]
ObjectiveId(::prost::alloc::string::String),
#[prost(string, tag = "3")]
ResourceId(::prost::alloc::string::String),
#[prost(string, tag = "4")]
AssetGroupId(::prost::alloc::string::String),
#[prost(string, tag = "5")]
AssetRid(::prost::alloc::string::String),
#[prost(message, tag = "6")]
PlanWide(super::PlanWide),
#[prost(string, tag = "7")]
SegmentId(::prost::alloc::string::String),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PlanWide {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConstraintKind {
#[prost(oneof = "constraint_kind::Kind", tags = "1, 2, 3, 4, 5, 6")]
pub kind: ::core::option::Option<constraint_kind::Kind>,
}
pub mod constraint_kind {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Kind {
#[prost(message, tag = "1")]
AllowedWindows(super::AllowedWindowsConstraint),
#[prost(message, tag = "2")]
Capacity(super::CapacityConstraint),
#[prost(message, tag = "3")]
Buffer(super::BufferConstraint),
#[prost(message, tag = "4")]
UsageCeiling(super::UsageCeilingConstraint),
#[prost(message, tag = "5")]
Precedence(super::PrecedenceConstraint),
#[prost(message, tag = "6")]
MutualExclusion(super::MutualExclusionConstraint),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AllowedWindowsConstraint {
#[prost(oneof = "allowed_windows_constraint::AllowedWindowsConstraint", tags = "1")]
pub allowed_windows_constraint: ::core::option::Option<
allowed_windows_constraint::AllowedWindowsConstraint,
>,
}
pub mod allowed_windows_constraint {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum AllowedWindowsConstraint {
#[prost(message, tag = "1")]
Explicit(super::ExplicitWindows),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExplicitWindows {
#[prost(string, repeated, tag = "1")]
pub segment_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "2")]
pub ranges: ::prost::alloc::vec::Vec<TimeRange>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TimeRange {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CapacityConstraint {
#[prost(oneof = "capacity_constraint::CapacityConstraint", tags = "1")]
pub capacity_constraint: ::core::option::Option<
capacity_constraint::CapacityConstraint,
>,
}
pub mod capacity_constraint {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum CapacityConstraint {
#[prost(message, tag = "1")]
Uniform(super::UniformCapacity),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UniformCapacity {
#[prost(int32, tag = "1")]
pub capacity: i32,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BufferConstraint {
#[prost(oneof = "buffer_constraint::BufferConstraint", tags = "1")]
pub buffer_constraint: ::core::option::Option<buffer_constraint::BufferConstraint>,
}
pub mod buffer_constraint {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum BufferConstraint {
#[prost(message, tag = "1")]
Fixed(super::FixedBuffer),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct FixedBuffer {
#[prost(message, optional, tag = "1")]
pub min_gap: ::core::option::Option<MinuteDuration>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct UsageCeilingConstraint {
#[prost(oneof = "usage_ceiling_constraint::UsageCeilingConstraint", tags = "1")]
pub usage_ceiling_constraint: ::core::option::Option<
usage_ceiling_constraint::UsageCeilingConstraint,
>,
}
pub mod usage_ceiling_constraint {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum UsageCeilingConstraint {
#[prost(message, tag = "1")]
PerCalendarDay(super::DailyUsageCeiling),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DailyUsageCeiling {
#[prost(message, optional, tag = "1")]
pub max_duration: ::core::option::Option<MinuteDuration>,
#[prost(int32, optional, tag = "2")]
pub max_count: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PrecedenceConstraint {
#[prost(oneof = "precedence_constraint::PrecedenceConstraint", tags = "1")]
pub precedence_constraint: ::core::option::Option<
precedence_constraint::PrecedenceConstraint,
>,
}
pub mod precedence_constraint {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum PrecedenceConstraint {
#[prost(message, tag = "1")]
After(super::ConstraintSubject),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct MutualExclusionConstraint {
#[prost(
oneof = "mutual_exclusion_constraint::MutualExclusionConstraint",
tags = "1"
)]
pub mutual_exclusion_constraint: ::core::option::Option<
mutual_exclusion_constraint::MutualExclusionConstraint,
>,
}
pub mod mutual_exclusion_constraint {
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum MutualExclusionConstraint {
#[prost(message, tag = "1")]
NoOverlap(super::NoOverlap),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct NoOverlap {}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlanRequest {
#[prost(message, optional, tag = "1")]
pub plan: ::core::option::Option<Plan>,
#[prost(string, tag = "2")]
pub message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlanResponse {
#[prost(message, optional, tag = "1")]
pub plan: ::core::option::Option<Plan>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlanRequest {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetPlanResponse {
#[prost(message, optional, tag = "1")]
pub plan: ::core::option::Option<Plan>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetPlansRequest {
#[prost(string, repeated, tag = "1")]
pub plan_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchGetPlansResponse {
#[prost(message, repeated, tag = "1")]
pub plans: ::prost::alloc::vec::Vec<Plan>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlanCommitRequest {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub content: ::core::option::Option<PlanContent>,
#[prost(string, optional, tag = "3")]
pub branch: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "4")]
pub message: ::prost::alloc::string::String,
#[prost(bool, tag = "5")]
pub is_working_state: bool,
#[prost(string, optional, tag = "6")]
pub expected_latest_commit: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePlanCommitResponse {
#[prost(message, optional, tag = "1")]
pub plan: ::core::option::Option<Plan>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePlanMetadataRequest {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "2")]
pub title: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "3")]
pub description: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "4")]
pub labels: ::core::option::Option<super::super::types::LabelUpdateWrapper>,
#[prost(message, optional, tag = "5")]
pub properties: ::core::option::Option<super::super::types::PropertyUpdateWrapper>,
#[prost(bool, optional, tag = "6")]
pub is_archived: ::core::option::Option<bool>,
#[prost(bool, optional, tag = "7")]
pub is_published: ::core::option::Option<bool>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UpdatePlanMetadataResponse {
#[prost(message, optional, tag = "1")]
pub metadata: ::core::option::Option<PlanMetadata>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPlansQuery {
#[prost(
oneof = "search_plans_query::Query",
tags = "1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14"
)]
pub query: ::core::option::Option<search_plans_query::Query>,
}
pub mod search_plans_query {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Query {
#[prost(message, tag = "1")]
And(super::SearchPlansQueryList),
#[prost(message, tag = "2")]
Or(super::SearchPlansQueryList),
#[prost(message, tag = "3")]
Not(::prost::alloc::boxed::Box<super::SearchPlansQuery>),
#[prost(string, tag = "4")]
ExactMatch(::prost::alloc::string::String),
#[prost(string, tag = "5")]
SearchText(::prost::alloc::string::String),
#[prost(message, tag = "6")]
Labels(super::super::super::types::LabelsFilter),
#[prost(message, tag = "7")]
Properties(super::super::super::types::PropertiesFilter),
#[prost(string, tag = "8")]
CreatedBy(::prost::alloc::string::String),
#[prost(bool, tag = "9")]
IsArchived(bool),
#[prost(bool, tag = "10")]
IsPublished(bool),
#[prost(bool, tag = "11")]
AuthorIsCurrentUser(bool),
#[prost(message, tag = "12")]
AuthorRids(super::UserRidList),
#[prost(string, tag = "13")]
WorkspaceRid(::prost::alloc::string::String),
#[prost(message, tag = "14")]
DateRangeOverlaps(super::PlanDateRangeFilter),
}
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PlanDateRangeFilter {
#[prost(message, optional, tag = "1")]
pub start: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
#[prost(message, optional, tag = "2")]
pub end: ::core::option::Option<super::super::super::google::protobuf::Timestamp>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPlansQueryList {
#[prost(message, repeated, tag = "1")]
pub queries: ::prost::alloc::vec::Vec<SearchPlansQuery>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct UserRidList {
#[prost(string, repeated, tag = "1")]
pub user_rids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PlanSortOptions {
#[prost(enumeration = "PlanSortField", tag = "1")]
pub field: i32,
#[prost(bool, tag = "2")]
pub is_descending: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPlansRequest {
#[prost(message, optional, tag = "1")]
pub query: ::core::option::Option<SearchPlansQuery>,
#[prost(message, optional, tag = "2")]
pub sort: ::core::option::Option<PlanSortOptions>,
#[prost(string, optional, tag = "3")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "4")]
pub page_size: ::core::option::Option<i32>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPlansResponse {
#[prost(message, repeated, tag = "1")]
pub results: ::prost::alloc::vec::Vec<PlanSummary>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatePlanRequest {
#[prost(oneof = "validate_plan_request::Source", tags = "1, 2")]
pub source: ::core::option::Option<validate_plan_request::Source>,
}
pub mod validate_plan_request {
#[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Source {
#[prost(message, tag = "1")]
Plan(super::StoredPlanRevision),
#[prost(message, tag = "2")]
Content(super::PlanContent),
}
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StoredPlanRevision {
#[prost(string, tag = "1")]
pub plan_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "2")]
pub at: ::core::option::Option<super::super::versioning::v1::BranchOrCommit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ValidatePlanResponse {
#[prost(message, repeated, tag = "1")]
pub violations: ::prost::alloc::vec::Vec<PlanViolation>,
#[prost(bool, tag = "2")]
pub is_truncated: bool,
#[prost(message, optional, tag = "3")]
pub commit: ::core::option::Option<super::super::versioning::v1::Commit>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanViolation {
#[prost(enumeration = "PlanViolationSeverity", tag = "1")]
pub severity: i32,
#[prost(string, tag = "2")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub message: ::prost::alloc::string::String,
#[prost(message, repeated, tag = "4")]
pub subjects: ::prost::alloc::vec::Vec<PlanViolationSubject>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PlanViolationSubject {
#[prost(enumeration = "PlanElementKind", tag = "1")]
pub kind: i32,
#[prost(string, tag = "2")]
pub id: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub path: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanSortField {
Unspecified = 0,
Name = 1,
CreatedAt = 2,
EditedAt = 3,
StartDate = 4,
EndDate = 5,
}
impl PlanSortField {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PLAN_SORT_FIELD_UNSPECIFIED",
Self::Name => "NAME",
Self::CreatedAt => "CREATED_AT",
Self::EditedAt => "EDITED_AT",
Self::StartDate => "START_DATE",
Self::EndDate => "END_DATE",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLAN_SORT_FIELD_UNSPECIFIED" => Some(Self::Unspecified),
"NAME" => Some(Self::Name),
"CREATED_AT" => Some(Self::CreatedAt),
"EDITED_AT" => Some(Self::EditedAt),
"START_DATE" => Some(Self::StartDate),
"END_DATE" => Some(Self::EndDate),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanViolationSeverity {
Unspecified = 0,
Error = 1,
Warning = 2,
}
impl PlanViolationSeverity {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PLAN_VIOLATION_SEVERITY_UNSPECIFIED",
Self::Error => "PLAN_VIOLATION_SEVERITY_ERROR",
Self::Warning => "PLAN_VIOLATION_SEVERITY_WARNING",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLAN_VIOLATION_SEVERITY_UNSPECIFIED" => Some(Self::Unspecified),
"PLAN_VIOLATION_SEVERITY_ERROR" => Some(Self::Error),
"PLAN_VIOLATION_SEVERITY_WARNING" => Some(Self::Warning),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanElementKind {
Unspecified = 0,
Plan = 1,
Objective = 2,
Activity = 3,
Segment = 4,
Milestone = 5,
AssetGroup = 6,
Constraint = 7,
}
impl PlanElementKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "PLAN_ELEMENT_KIND_UNSPECIFIED",
Self::Plan => "PLAN_ELEMENT_KIND_PLAN",
Self::Objective => "PLAN_ELEMENT_KIND_OBJECTIVE",
Self::Activity => "PLAN_ELEMENT_KIND_ACTIVITY",
Self::Segment => "PLAN_ELEMENT_KIND_SEGMENT",
Self::Milestone => "PLAN_ELEMENT_KIND_MILESTONE",
Self::AssetGroup => "PLAN_ELEMENT_KIND_ASSET_GROUP",
Self::Constraint => "PLAN_ELEMENT_KIND_CONSTRAINT",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLAN_ELEMENT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"PLAN_ELEMENT_KIND_PLAN" => Some(Self::Plan),
"PLAN_ELEMENT_KIND_OBJECTIVE" => Some(Self::Objective),
"PLAN_ELEMENT_KIND_ACTIVITY" => Some(Self::Activity),
"PLAN_ELEMENT_KIND_SEGMENT" => Some(Self::Segment),
"PLAN_ELEMENT_KIND_MILESTONE" => Some(Self::Milestone),
"PLAN_ELEMENT_KIND_ASSET_GROUP" => Some(Self::AssetGroup),
"PLAN_ELEMENT_KIND_CONSTRAINT" => Some(Self::Constraint),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PlanError {
PlanNotFound = 0,
BranchOrCommitNotFound = 1,
CommitConflict = 2,
PlanArchived = 3,
}
impl PlanError {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::PlanNotFound => "PLAN_ERROR_PLAN_NOT_FOUND",
Self::BranchOrCommitNotFound => "PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND",
Self::CommitConflict => "PLAN_ERROR_COMMIT_CONFLICT",
Self::PlanArchived => "PLAN_ERROR_PLAN_ARCHIVED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"PLAN_ERROR_PLAN_NOT_FOUND" => Some(Self::PlanNotFound),
"PLAN_ERROR_BRANCH_OR_COMMIT_NOT_FOUND" => Some(Self::BranchOrCommitNotFound),
"PLAN_ERROR_COMMIT_CONFLICT" => Some(Self::CommitConflict),
"PLAN_ERROR_PLAN_ARCHIVED" => Some(Self::PlanArchived),
_ => None,
}
}
}
pub mod plan_service_client {
#![allow(
unused_variables,
dead_code,
missing_docs,
clippy::wildcard_imports,
clippy::let_unit_value,
)]
use tonic::codegen::*;
use tonic::codegen::http::Uri;
#[derive(Debug, Clone)]
pub struct PlanServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl PlanServiceClient<tonic::transport::Channel> {
pub async fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error>
where
D: TryInto<tonic::transport::Endpoint>,
D::Error: Into<StdError>,
{
let conn = tonic::transport::Endpoint::new(dst)?.connect().await?;
Ok(Self::new(conn))
}
}
impl<T> PlanServiceClient<T>
where
T: tonic::client::GrpcService<tonic::body::Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
{
pub fn new(inner: T) -> Self {
let inner = tonic::client::Grpc::new(inner);
Self { inner }
}
pub fn with_origin(inner: T, origin: Uri) -> Self {
let inner = tonic::client::Grpc::with_origin(inner, origin);
Self { inner }
}
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PlanServiceClient<InterceptedService<T, F>>
where
F: tonic::service::Interceptor,
T::ResponseBody: Default,
T: tonic::codegen::Service<
http::Request<tonic::body::Body>,
Response = http::Response<
<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody,
>,
>,
<T as tonic::codegen::Service<
http::Request<tonic::body::Body>,
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
{
PlanServiceClient::new(InterceptedService::new(inner, interceptor))
}
#[must_use]
pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.send_compressed(encoding);
self
}
#[must_use]
pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
self.inner = self.inner.accept_compressed(encoding);
self
}
#[must_use]
pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_decoding_message_size(limit);
self
}
#[must_use]
pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
self.inner = self.inner.max_encoding_message_size(limit);
self
}
pub async fn create_plan(
&mut self,
request: impl tonic::IntoRequest<super::CreatePlanRequest>,
) -> std::result::Result<
tonic::Response<super::CreatePlanResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/CreatePlan",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlan"));
self.inner.unary(req, path, codec).await
}
pub async fn get_plan(
&mut self,
request: impl tonic::IntoRequest<super::GetPlanRequest>,
) -> std::result::Result<
tonic::Response<super::GetPlanResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/GetPlan",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.plan.v1.PlanService", "GetPlan"));
self.inner.unary(req, path, codec).await
}
pub async fn batch_get_plans(
&mut self,
request: impl tonic::IntoRequest<super::BatchGetPlansRequest>,
) -> std::result::Result<
tonic::Response<super::BatchGetPlansResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/BatchGetPlans",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.plan.v1.PlanService", "BatchGetPlans"));
self.inner.unary(req, path, codec).await
}
pub async fn create_plan_commit(
&mut self,
request: impl tonic::IntoRequest<super::CreatePlanCommitRequest>,
) -> std::result::Result<
tonic::Response<super::CreatePlanCommitResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/CreatePlanCommit",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.plan.v1.PlanService", "CreatePlanCommit"),
);
self.inner.unary(req, path, codec).await
}
pub async fn update_plan_metadata(
&mut self,
request: impl tonic::IntoRequest<super::UpdatePlanMetadataRequest>,
) -> std::result::Result<
tonic::Response<super::UpdatePlanMetadataResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/UpdatePlanMetadata",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new("nominal.plan.v1.PlanService", "UpdatePlanMetadata"),
);
self.inner.unary(req, path, codec).await
}
pub async fn search_plans(
&mut self,
request: impl tonic::IntoRequest<super::SearchPlansRequest>,
) -> std::result::Result<
tonic::Response<super::SearchPlansResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/SearchPlans",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.plan.v1.PlanService", "SearchPlans"));
self.inner.unary(req, path, codec).await
}
pub async fn validate_plan(
&mut self,
request: impl tonic::IntoRequest<super::ValidatePlanRequest>,
) -> std::result::Result<
tonic::Response<super::ValidatePlanResponse>,
tonic::Status,
> {
self.inner
.ready()
.await
.map_err(|e| {
tonic::Status::unknown(
format!("Service was not ready: {}", e.into()),
)
})?;
let codec = tonic::codec::ProstCodec::default();
let path = http::uri::PathAndQuery::from_static(
"/nominal.plan.v1.PlanService/ValidatePlan",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(GrpcMethod::new("nominal.plan.v1.PlanService", "ValidatePlan"));
self.inner.unary(req, path, codec).await
}
}
}