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
/*
* GitHub's official OpenAPI spec + Octokit extension
*
* OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
*
* The version of the OpenAPI document: 16.6.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// SecretScanningLocationCommit : Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SecretScanningLocationCommit {
/// The file path in the repository
#[serde(rename = "path")]
pub path: String,
/// Line number at which the secret starts in the file
#[serde(rename = "start_line")]
pub start_line: f64,
/// Line number at which the secret ends in the file
#[serde(rename = "end_line")]
pub end_line: f64,
/// The column at which the secret starts within the start line when the file is interpreted as 8BIT ASCII
#[serde(rename = "start_column")]
pub start_column: f64,
/// The column at which the secret ends within the end line when the file is interpreted as 8BIT ASCII
#[serde(rename = "end_column")]
pub end_column: f64,
/// SHA-1 hash ID of the associated blob
#[serde(rename = "blob_sha")]
pub blob_sha: String,
/// The API URL to get the associated blob resource
#[serde(rename = "blob_url")]
pub blob_url: String,
/// SHA-1 hash ID of the associated commit
#[serde(rename = "commit_sha")]
pub commit_sha: String,
/// The API URL to get the associated commit resource
#[serde(rename = "commit_url")]
pub commit_url: String,
}
impl SecretScanningLocationCommit {
/// Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
pub fn new(path: String, start_line: f64, end_line: f64, start_column: f64, end_column: f64, blob_sha: String, blob_url: String, commit_sha: String, commit_url: String) -> SecretScanningLocationCommit {
SecretScanningLocationCommit {
path,
start_line,
end_line,
start_column,
end_column,
blob_sha,
blob_url,
commit_sha,
commit_url,
}
}
}