hanzo_client/models/issue_hit.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct IssueHit {
16 /// Assignee is who holds the work. EMPTY MEANS UNHELD, which is what makes the issue claimable: claiming one already held by someone else is refused with 409 rather than quietly taken.
17 #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
18 pub assignee: Option<String>,
19 /// Kind is what the row IS: issue, pr or epic.
20 #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
21 pub kind: Option<String>,
22 /// Number is the issue's number on that board, from 1 and monotonic there. Unique per board, never across the org — so it addresses an issue only together with Project.
23 #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
24 pub number: Option<i32>,
25 /// Priority is urgent, high, medium, low or none. Never empty — an unset priority is the value \"none\".
26 #[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
27 pub priority: Option<String>,
28 /// Project is the board key the issue is on. It and Number are the issue's address in every other route on this surface, which is why a hit carries it.
29 #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
30 pub project: Option<String>,
31 /// Repo is the git repository the issue is bound to, empty when it is not repo-bound.
32 #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
33 pub repo: Option<String>,
34 /// Room is the collaboration room the issue belongs to, spelled \"<workspace>_<room>\" — empty when it is not room-bound, which is most of them. It is here so an org-wide search says which channel each item came from without a second read.
35 #[serde(rename = "room", skip_serializing_if = "Option::is_none")]
36 pub room: Option<String>,
37 /// Source is which surface opened it: team, git, crm, helpdesk, cms or agent. \"git\" is how the mirrored forge and GitHub rows are spelled.
38 #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
39 pub source: Option<String>,
40 /// Status is the board column: backlog, todo, in_progress, done or canceled. Claiming moves backlog and todo to in_progress and leaves the other three where they are.
41 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
42 pub status: Option<String>,
43 /// Title is the issue's one-line summary — what the q filter matched, along with the description.
44 #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
45 pub title: Option<String>,
46 /// URL is the row's external anchor — its extRef — which is a link only when the feeder sent one. A mirrored GitHub issue carries \"github:owner/repo#123\" and an agent's PR row carries the pushed branch. Empty for a row opened here.
47 #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
48 pub url: Option<String>,
49}
50
51impl IssueHit {
52 pub fn new() -> IssueHit {
53 IssueHit {
54 assignee: None,
55 kind: None,
56 number: None,
57 priority: None,
58 project: None,
59 repo: None,
60 room: None,
61 source: None,
62 status: None,
63 title: None,
64 url: None,
65 }
66 }
67}
68