1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IssueView {
/// Assignee is who holds the work — an IAM username, or the login of the FIRST assignee when a forge issue has several. Absent when nobody holds it, which is exactly the state a claim needs.
#[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
pub assignee: Option<String>,
/// CreatedAt is when the item was opened, in unix seconds. 0 when the source gave no parseable timestamp.
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<i32>,
/// Description is the body, markdown as its author wrote it. Absent when empty.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// DueAt is when the work is due, in unix seconds; absent means no due date. A forge row takes it from its MILESTONE's due date, since a forge issue has no deadline of its own. Never before StartAt, and never past 2200-01-01.
#[serde(rename = "dueAt", skip_serializing_if = "Option::is_none")]
pub due_at: Option<i32>,
/// ExtRef anchors the item to something outside the todo — a mirrored issue (\"github:owner/repo#123\"), a pushed PR branch, or a record on another plane. It is the idempotency key the mirror upsert matches on. Absent when the item has no external origin.
#[serde(rename = "extRef", skip_serializing_if = "Option::is_none")]
pub ext_ref: Option<String>,
/// ID is the work item's opaque handle, and it is NOT how you address it — ProjectKey plus Number is. Its shape says which source answered: a forge issue's is the forge's own numeric id in decimal, an index row's a minted \"issue_\" id.
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Identifier is the human handle, \"<key>#<number>\" — the board and the number on it, joined. ONE spelling whichever source answered, because a list where forge rows read cli#1 and index rows read OPS-3 is two products in one list.
#[serde(rename = "identifier", skip_serializing_if = "Option::is_none")]
pub identifier: Option<String>,
/// Kind is what the item IS: issue, pr or epic. Set once at create and never changed, so a row does not migrate between surfaces. Deliberately not \"task\" — that word is the async plane (contract.go).
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Labels are the item's remaining tags, with the status and priority labels lifted OUT — a column that stayed here would render twice, once as the card's column and once as a chip on the card. Always present; empty is [].
#[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
pub labels: Option<Vec<String>>,
/// Number is the item's number ON ITS BOARD, from 1 and monotonic there — the forge's own issue number for a forge row, allocated inside the create transaction for an index row so it cannot race. Unique per board, never across the org.
#[serde(rename = "number", skip_serializing_if = "Option::is_none")]
pub number: Option<i32>,
/// Priority is urgent, high, medium, low or none. Also a label on a forge row. Never empty: \"none\" when nothing names one, so callers compare a value rather than test for absence.
#[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
pub priority: Option<String>,
/// ProjectKey is the board this item is on: the repository name for a forge issue, the index board's key otherwise. With Number it is the item's address in every other route.
#[serde(rename = "projectKey", skip_serializing_if = "Option::is_none")]
pub project_key: Option<String>,
/// Repo is the git repository the item is bound to, so a repository's Issues and PRs tabs are filters over this one table. Absent when the item is not repo-bound.
#[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
pub repo: Option<String>,
/// Source is which surface OPENED it: team, git, crm, helpdesk, cms or agent. Also set once. It is the ORIGIN, not the subject — source=helpdesk is an engineering issue opened from a support escalation, not a support ticket.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// StartAt is when the work starts, in unix seconds; absent means unscheduled. A forge row takes it from when the issue was opened, but only once the issue has a due date — an interval needs both ends.
#[serde(rename = "startAt", skip_serializing_if = "Option::is_none")]
pub start_at: Option<i32>,
/// Status is the board column: backlog, todo, in_progress, done or canceled, and nothing else. On a forge row it is read off a LABEL, so relabelling in the forge web UI moves the card here and vice versa — and a CLOSED forge issue reads done whatever its labels say. Never empty: \"backlog\" when nothing names a column.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Title is the item's one-line summary.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// UpdatedAt is when it last changed, in unix seconds.
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<i32>,
}
impl IssueView {
pub fn new() -> IssueView {
IssueView {
assignee: None,
created_at: None,
description: None,
due_at: None,
ext_ref: None,
id: None,
identifier: None,
kind: None,
labels: None,
number: None,
priority: None,
project_key: None,
repo: None,
source: None,
start_at: None,
status: None,
title: None,
updated_at: None,
}
}
}