openapi_github/models/secret_scanning_location_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/// SecretScanningLocationCommit : Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SecretScanningLocationCommit {
17 /// The file path in the repository
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 8BIT 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 8BIT 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 API URL to get the associated blob resource
36 #[serde(rename = "blob_url")]
37 pub blob_url: String,
38 /// SHA-1 hash ID of the associated commit
39 #[serde(rename = "commit_sha")]
40 pub commit_sha: String,
41 /// The API URL to get the associated commit resource
42 #[serde(rename = "commit_url")]
43 pub commit_url: String,
44}
45
46impl SecretScanningLocationCommit {
47 /// Represents a 'commit' secret scanning location type. This location type shows that a secret was detected inside a commit to a repository.
48 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 {
49 SecretScanningLocationCommit {
50 path,
51 start_line,
52 end_line,
53 start_column,
54 end_column,
55 blob_sha,
56 blob_url,
57 commit_sha,
58 commit_url,
59 }
60 }
61}
62