#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvalContribution {
#[prost(string, tag = "1")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(enumeration = "ContributionSource", tag = "3")]
pub source: i32,
#[prost(string, tag = "4")]
pub use_case: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub expected_behavior: ::prost::alloc::string::String,
#[prost(string, optional, tag = "6")]
pub scenario_hint: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "7")]
pub capability_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "8")]
pub failure_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "9")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "10")]
pub owner_user_rid: ::prost::alloc::string::String,
#[prost(string, tag = "11")]
pub created_by_user_rid: ::prost::alloc::string::String,
#[prost(enumeration = "ContributionLifecycle", tag = "12")]
pub lifecycle: i32,
#[prost(int64, tag = "13")]
pub revision: i64,
#[prost(string, optional, tag = "14")]
pub latest_brief_digest: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "15")]
pub needs_input: ::core::option::Option<NeedsInput>,
#[prost(string, optional, tag = "16")]
pub closed_reason: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "17")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "18")]
pub updated_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NeedsInput {
#[prost(string, tag = "1")]
pub reason: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub requested_from: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub resume_action: ::prost::alloc::string::String,
#[prost(enumeration = "ContributionLifecycle", tag = "4")]
pub resume_lifecycle: i32,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvidenceReference {
#[prost(string, tag = "1")]
pub evidence_reference_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
#[prost(bool, tag = "4")]
pub is_synthetic: bool,
#[prost(string, tag = "5")]
pub created_by_user_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BehaviorBriefRevision {
#[prost(string, tag = "1")]
pub behavior_brief_revision_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(int32, tag = "3")]
pub revision_number: i32,
#[prost(string, tag = "4")]
pub digest: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub summary: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub expected_response: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub expected_persisted_state: ::prost::alloc::string::String,
#[prost(string, tag = "8")]
pub expected_trajectory: ::prost::alloc::string::String,
#[prost(string, tag = "9")]
pub expected_interaction: ::prost::alloc::string::String,
#[prost(string, tag = "10")]
pub provenance_kind: ::prost::alloc::string::String,
#[prost(string, optional, tag = "11")]
pub generator_provider: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "12")]
pub generator_model: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "13")]
pub generator_prompt_version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, tag = "14")]
pub created_by_user_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "15")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Decision {
#[prost(string, tag = "1")]
pub decision_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(enumeration = "DecisionKind", tag = "3")]
pub kind: i32,
#[prost(string, tag = "4")]
pub subject_digest: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub actor_user_rid: ::prost::alloc::string::String,
#[prost(message, optional, tag = "6")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LifecycleEvent {
#[prost(string, tag = "1")]
pub lifecycle_event_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
#[prost(enumeration = "ContributionLifecycle", optional, tag = "4")]
pub from_lifecycle: ::core::option::Option<i32>,
#[prost(enumeration = "ContributionLifecycle", optional, tag = "5")]
pub to_lifecycle: ::core::option::Option<i32>,
#[prost(string, tag = "6")]
pub actor_user_rid: ::prost::alloc::string::String,
#[prost(string, optional, tag = "7")]
pub reason: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "8")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowJobFailure {
#[prost(string, tag = "1")]
pub code: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub safe_message: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct WorkflowJob {
#[prost(string, tag = "1")]
pub workflow_job_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub kind: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub input_reference_rid: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub input_digest: ::prost::alloc::string::String,
#[prost(enumeration = "WorkflowJobStatus", tag = "6")]
pub status: i32,
#[prost(int32, tag = "7")]
pub attempt_count: i32,
#[prost(string, optional, tag = "8")]
pub provider: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "9")]
pub prompt_version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "10")]
pub model: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "11")]
pub tool_contract_version: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "12")]
pub failure: ::core::option::Option<WorkflowJobFailure>,
#[prost(string, optional, tag = "13")]
pub output_reference: ::core::option::Option<::prost::alloc::string::String>,
#[prost(message, optional, tag = "14")]
pub available_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "15")]
pub claimed_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "16")]
pub created_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(message, optional, tag = "17")]
pub updated_at: ::core::option::Option<
super::super::super::super::google::protobuf::Timestamp,
>,
#[prost(string, tag = "18")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "19")]
pub revision: i64,
#[prost(string, optional, tag = "20")]
pub output_digest: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EvalContributionDetail {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
#[prost(message, repeated, tag = "2")]
pub evidence_references: ::prost::alloc::vec::Vec<EvidenceReference>,
#[prost(message, repeated, tag = "3")]
pub behavior_brief_revisions: ::prost::alloc::vec::Vec<BehaviorBriefRevision>,
#[prost(message, repeated, tag = "4")]
pub decisions: ::prost::alloc::vec::Vec<Decision>,
#[prost(message, repeated, tag = "5")]
pub lifecycle_events: ::prost::alloc::vec::Vec<LifecycleEvent>,
#[prost(message, repeated, tag = "6")]
pub workflow_jobs: ::prost::alloc::vec::Vec<WorkflowJob>,
#[prost(bool, tag = "7")]
pub related_records_truncated: bool,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ScratchContributionDraft {
#[prost(string, tag = "1")]
pub use_case: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub expected_behavior: ::prost::alloc::string::String,
#[prost(string, optional, tag = "3")]
pub scenario_hint: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "4")]
pub capability_labels: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, repeated, tag = "5")]
pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEvalContributionRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(message, optional, tag = "3")]
pub scratch: ::core::option::Option<ScratchContributionDraft>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEvalContributionResponse {
#[prost(message, optional, tag = "1")]
pub detail: ::core::option::Option<EvalContributionDetail>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEvalContributionsRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(
enumeration = "ContributionLifecycle",
repeated,
packed = "false",
tag = "2"
)]
pub lifecycle: ::prost::alloc::vec::Vec<i32>,
#[prost(enumeration = "ContributionSource", repeated, packed = "false", tag = "3")]
pub source: ::prost::alloc::vec::Vec<i32>,
#[prost(string, optional, tag = "4")]
pub owner_user_rid: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "5")]
pub capability_label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(string, optional, tag = "6")]
pub failure_label: ::core::option::Option<::prost::alloc::string::String>,
#[prost(int32, optional, tag = "7")]
pub page_size: ::core::option::Option<i32>,
#[prost(string, optional, tag = "8")]
pub page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEvalContributionsResponse {
#[prost(message, repeated, tag = "1")]
pub contributions: ::prost::alloc::vec::Vec<EvalContribution>,
#[prost(string, optional, tag = "2")]
pub next_page_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEvalContributionRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEvalContributionResponse {
#[prost(message, optional, tag = "1")]
pub detail: ::core::option::Option<EvalContributionDetail>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BehaviorBriefDraft {
#[prost(string, tag = "1")]
pub summary: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub expected_response: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub expected_persisted_state: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub expected_trajectory: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub expected_interaction: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBehaviorBriefRevisionRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
#[prost(string, optional, tag = "5")]
pub expected_previous_brief_digest: ::core::option::Option<
::prost::alloc::string::String,
>,
#[prost(message, optional, tag = "6")]
pub behavior_brief: ::core::option::Option<BehaviorBriefDraft>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateBehaviorBriefRevisionResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
#[prost(message, optional, tag = "2")]
pub behavior_brief_revision: ::core::option::Option<BehaviorBriefRevision>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfirmBehaviorBriefRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
#[prost(string, tag = "5")]
pub behavior_brief_digest: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ConfirmBehaviorBriefResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
#[prost(message, optional, tag = "2")]
pub decision: ::core::option::Option<Decision>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptBehaviorBriefForPlanningRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
#[prost(string, tag = "5")]
pub behavior_brief_digest: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AcceptBehaviorBriefForPlanningResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
#[prost(message, optional, tag = "2")]
pub decision: ::core::option::Option<Decision>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestEvalContributionInputRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
#[prost(string, tag = "5")]
pub reason: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub requested_from: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub resume_action: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RequestEvalContributionInputResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveEvalContributionInputRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ResolveEvalContributionInputResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseEvalContributionRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
#[prost(string, tag = "5")]
pub reason: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseEvalContributionResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReopenEvalContributionRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "4")]
pub expected_contribution_revision: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReopenEvalContributionResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetryEvalWorkflowJobRequest {
#[prost(string, tag = "1")]
pub workspace_rid: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub contribution_rid: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub workflow_job_rid: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub idempotency_key: ::prost::alloc::string::String,
#[prost(int64, tag = "5")]
pub expected_contribution_revision: i64,
#[prost(int64, tag = "6")]
pub expected_workflow_job_revision: i64,
}
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetryEvalWorkflowJobResponse {
#[prost(message, optional, tag = "1")]
pub contribution: ::core::option::Option<EvalContribution>,
#[prost(message, optional, tag = "2")]
pub workflow_job: ::core::option::Option<WorkflowJob>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContributionSource {
Unspecified = 0,
WorkbenchScratch = 1,
}
impl ContributionSource {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONTRIBUTION_SOURCE_UNSPECIFIED",
Self::WorkbenchScratch => "CONTRIBUTION_SOURCE_WORKBENCH_SCRATCH",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRIBUTION_SOURCE_UNSPECIFIED" => Some(Self::Unspecified),
"CONTRIBUTION_SOURCE_WORKBENCH_SCRATCH" => Some(Self::WorkbenchScratch),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum ContributionLifecycle {
Unspecified = 0,
NeedsBehaviorReview = 1,
NeedsProposalReview = 2,
PrOpen = 3,
AddedToEvalSet = 4,
NeedsInput = 5,
Closed = 6,
}
impl ContributionLifecycle {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "CONTRIBUTION_LIFECYCLE_UNSPECIFIED",
Self::NeedsBehaviorReview => "CONTRIBUTION_LIFECYCLE_NEEDS_BEHAVIOR_REVIEW",
Self::NeedsProposalReview => "CONTRIBUTION_LIFECYCLE_NEEDS_PROPOSAL_REVIEW",
Self::PrOpen => "CONTRIBUTION_LIFECYCLE_PR_OPEN",
Self::AddedToEvalSet => "CONTRIBUTION_LIFECYCLE_ADDED_TO_EVAL_SET",
Self::NeedsInput => "CONTRIBUTION_LIFECYCLE_NEEDS_INPUT",
Self::Closed => "CONTRIBUTION_LIFECYCLE_CLOSED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"CONTRIBUTION_LIFECYCLE_UNSPECIFIED" => Some(Self::Unspecified),
"CONTRIBUTION_LIFECYCLE_NEEDS_BEHAVIOR_REVIEW" => {
Some(Self::NeedsBehaviorReview)
}
"CONTRIBUTION_LIFECYCLE_NEEDS_PROPOSAL_REVIEW" => {
Some(Self::NeedsProposalReview)
}
"CONTRIBUTION_LIFECYCLE_PR_OPEN" => Some(Self::PrOpen),
"CONTRIBUTION_LIFECYCLE_ADDED_TO_EVAL_SET" => Some(Self::AddedToEvalSet),
"CONTRIBUTION_LIFECYCLE_NEEDS_INPUT" => Some(Self::NeedsInput),
"CONTRIBUTION_LIFECYCLE_CLOSED" => Some(Self::Closed),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum DecisionKind {
Unspecified = 0,
ConfirmBrief = 1,
AcceptForPlanning = 2,
ApproveForPublication = 3,
}
impl DecisionKind {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "DECISION_KIND_UNSPECIFIED",
Self::ConfirmBrief => "DECISION_KIND_CONFIRM_BRIEF",
Self::AcceptForPlanning => "DECISION_KIND_ACCEPT_FOR_PLANNING",
Self::ApproveForPublication => "DECISION_KIND_APPROVE_FOR_PUBLICATION",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"DECISION_KIND_UNSPECIFIED" => Some(Self::Unspecified),
"DECISION_KIND_CONFIRM_BRIEF" => Some(Self::ConfirmBrief),
"DECISION_KIND_ACCEPT_FOR_PLANNING" => Some(Self::AcceptForPlanning),
"DECISION_KIND_APPROVE_FOR_PUBLICATION" => Some(Self::ApproveForPublication),
_ => None,
}
}
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum WorkflowJobStatus {
Unspecified = 0,
Pending = 1,
Running = 2,
Succeeded = 3,
Failed = 4,
}
impl WorkflowJobStatus {
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "WORKFLOW_JOB_STATUS_UNSPECIFIED",
Self::Pending => "WORKFLOW_JOB_STATUS_PENDING",
Self::Running => "WORKFLOW_JOB_STATUS_RUNNING",
Self::Succeeded => "WORKFLOW_JOB_STATUS_SUCCEEDED",
Self::Failed => "WORKFLOW_JOB_STATUS_FAILED",
}
}
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"WORKFLOW_JOB_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
"WORKFLOW_JOB_STATUS_PENDING" => Some(Self::Pending),
"WORKFLOW_JOB_STATUS_RUNNING" => Some(Self::Running),
"WORKFLOW_JOB_STATUS_SUCCEEDED" => Some(Self::Succeeded),
"WORKFLOW_JOB_STATUS_FAILED" => Some(Self::Failed),
_ => None,
}
}
}
pub mod eval_contribution_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 EvalContributionServiceClient<T> {
inner: tonic::client::Grpc<T>,
}
impl EvalContributionServiceClient<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> EvalContributionServiceClient<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,
) -> EvalContributionServiceClient<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,
{
EvalContributionServiceClient::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_eval_contribution(
&mut self,
request: impl tonic::IntoRequest<super::CreateEvalContributionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateEvalContributionResponse>,
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.ai.eval.v1.EvalContributionService/CreateEvalContribution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"CreateEvalContribution",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn list_eval_contributions(
&mut self,
request: impl tonic::IntoRequest<super::ListEvalContributionsRequest>,
) -> std::result::Result<
tonic::Response<super::ListEvalContributionsResponse>,
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.ai.eval.v1.EvalContributionService/ListEvalContributions",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"ListEvalContributions",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn get_eval_contribution(
&mut self,
request: impl tonic::IntoRequest<super::GetEvalContributionRequest>,
) -> std::result::Result<
tonic::Response<super::GetEvalContributionResponse>,
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.ai.eval.v1.EvalContributionService/GetEvalContribution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"GetEvalContribution",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn create_behavior_brief_revision(
&mut self,
request: impl tonic::IntoRequest<super::CreateBehaviorBriefRevisionRequest>,
) -> std::result::Result<
tonic::Response<super::CreateBehaviorBriefRevisionResponse>,
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.ai.eval.v1.EvalContributionService/CreateBehaviorBriefRevision",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"CreateBehaviorBriefRevision",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn confirm_behavior_brief(
&mut self,
request: impl tonic::IntoRequest<super::ConfirmBehaviorBriefRequest>,
) -> std::result::Result<
tonic::Response<super::ConfirmBehaviorBriefResponse>,
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.ai.eval.v1.EvalContributionService/ConfirmBehaviorBrief",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"ConfirmBehaviorBrief",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn accept_behavior_brief_for_planning(
&mut self,
request: impl tonic::IntoRequest<
super::AcceptBehaviorBriefForPlanningRequest,
>,
) -> std::result::Result<
tonic::Response<super::AcceptBehaviorBriefForPlanningResponse>,
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.ai.eval.v1.EvalContributionService/AcceptBehaviorBriefForPlanning",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"AcceptBehaviorBriefForPlanning",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn request_eval_contribution_input(
&mut self,
request: impl tonic::IntoRequest<super::RequestEvalContributionInputRequest>,
) -> std::result::Result<
tonic::Response<super::RequestEvalContributionInputResponse>,
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.ai.eval.v1.EvalContributionService/RequestEvalContributionInput",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"RequestEvalContributionInput",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn resolve_eval_contribution_input(
&mut self,
request: impl tonic::IntoRequest<super::ResolveEvalContributionInputRequest>,
) -> std::result::Result<
tonic::Response<super::ResolveEvalContributionInputResponse>,
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.ai.eval.v1.EvalContributionService/ResolveEvalContributionInput",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"ResolveEvalContributionInput",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn close_eval_contribution(
&mut self,
request: impl tonic::IntoRequest<super::CloseEvalContributionRequest>,
) -> std::result::Result<
tonic::Response<super::CloseEvalContributionResponse>,
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.ai.eval.v1.EvalContributionService/CloseEvalContribution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"CloseEvalContribution",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn reopen_eval_contribution(
&mut self,
request: impl tonic::IntoRequest<super::ReopenEvalContributionRequest>,
) -> std::result::Result<
tonic::Response<super::ReopenEvalContributionResponse>,
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.ai.eval.v1.EvalContributionService/ReopenEvalContribution",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"ReopenEvalContribution",
),
);
self.inner.unary(req, path, codec).await
}
pub async fn retry_eval_workflow_job(
&mut self,
request: impl tonic::IntoRequest<super::RetryEvalWorkflowJobRequest>,
) -> std::result::Result<
tonic::Response<super::RetryEvalWorkflowJobResponse>,
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.ai.eval.v1.EvalContributionService/RetryEvalWorkflowJob",
);
let mut req = request.into_request();
req.extensions_mut()
.insert(
GrpcMethod::new(
"nominal.ai.eval.v1.EvalContributionService",
"RetryEvalWorkflowJob",
),
);
self.inner.unary(req, path, codec).await
}
}
}