hanzo_client/models/github_search_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 GithubSearchHit {
16 /// CloneURL is the repository's https git remote.
17 #[serde(rename = "clone_url", skip_serializing_if = "Option::is_none")]
18 pub clone_url: Option<String>,
19 /// DefaultBranch is the branch a clone checks out.
20 #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
21 pub default_branch: Option<String>,
22 /// Description is the blurb the repository's owner wrote. Empty when it has none.
23 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
24 pub description: Option<String>,
25 /// FullName is the repository's \"owner/repo\" on GitHub. Finding it here does NOT make it forkable: githubFork takes a repo the org's installation was granted, and a hit from the public index usually is not one.
26 #[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
27 pub full_name: Option<String>,
28 /// HTMLURL is the repository's page on github.com.
29 #[serde(rename = "html_url", skip_serializing_if = "Option::is_none")]
30 pub html_url: Option<String>,
31 /// Language is the primary language GitHub detected from the file mix (\"Go\", \"TypeScript\"). Empty when GitHub attributes none.
32 #[serde(rename = "language", skip_serializing_if = "Option::is_none")]
33 pub language: Option<String>,
34 /// Private is GitHub's visibility flag, passed through. This op reads the public index — the org's token only charges the rate limit to the installation — so it is false for everything a search can reach.
35 #[serde(rename = "private", skip_serializing_if = "Option::is_none")]
36 pub private: Option<bool>,
37 /// Stars is GitHub's stargazers_count as the SEARCH INDEX held it when the query ran — a snapshot, not a live count off the repository.
38 #[serde(rename = "stars", skip_serializing_if = "Option::is_none")]
39 pub stars: Option<i32>,
40}
41
42impl GithubSearchHit {
43 pub fn new() -> GithubSearchHit {
44 GithubSearchHit {
45 clone_url: None,
46 default_branch: None,
47 description: None,
48 full_name: None,
49 html_url: None,
50 language: None,
51 private: None,
52 stars: None,
53 }
54 }
55}
56