openapi_github/models/secret_scanning_location_wiki_commit.rs
1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SecretScanningLocationWikiCommit : Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SecretScanningLocationWikiCommit {
17 /// The file path of the wiki page
18 #[serde(rename = "path")]
19 pub path: String,
20 /// Line number at which the secret starts in the file
21 #[serde(rename = "start_line")]
22 pub start_line: f64,
23 /// Line number at which the secret ends in the file
24 #[serde(rename = "end_line")]
25 pub end_line: f64,
26 /// The column at which the secret starts within the start line when the file is interpreted as 8-bit ASCII.
27 #[serde(rename = "start_column")]
28 pub start_column: f64,
29 /// The column at which the secret ends within the end line when the file is interpreted as 8-bit ASCII.
30 #[serde(rename = "end_column")]
31 pub end_column: f64,
32 /// SHA-1 hash ID of the associated blob
33 #[serde(rename = "blob_sha")]
34 pub blob_sha: String,
35 /// The GitHub URL to get the associated wiki page
36 #[serde(rename = "page_url")]
37 pub page_url: String,
38 /// SHA-1 hash ID of the associated commit
39 #[serde(rename = "commit_sha")]
40 pub commit_sha: String,
41 /// The GitHub URL to get the associated wiki commit
42 #[serde(rename = "commit_url")]
43 pub commit_url: String,
44}
45
46impl SecretScanningLocationWikiCommit {
47 /// Represents a 'wiki_commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository wiki.
48 pub fn new(path: String, start_line: f64, end_line: f64, start_column: f64, end_column: f64, blob_sha: String, page_url: String, commit_sha: String, commit_url: String) -> SecretScanningLocationWikiCommit {
49 SecretScanningLocationWikiCommit {
50 path,
51 start_line,
52 end_line,
53 start_column,
54 end_column,
55 blob_sha,
56 page_url,
57 commit_sha,
58 commit_url,
59 }
60 }
61}
62