openapi_github/models/
secret_scanning_location.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SecretScanningLocation {
16    /// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found.
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<Type>,
19    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
20    pub details: Option<Box<models::SecretScanningLocationDetails>>,
21}
22
23impl SecretScanningLocation {
24    pub fn new() -> SecretScanningLocation {
25        SecretScanningLocation {
26            r#type: None,
27            details: None,
28        }
29    }
30}
31/// The location type. Because secrets may be found in different types of resources (ie. code, comments, issues, pull requests, discussions), this field identifies the type of resource where the secret was found.
32#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
33pub enum Type {
34    #[serde(rename = "commit")]
35    Commit,
36    #[serde(rename = "wiki_commit")]
37    WikiCommit,
38    #[serde(rename = "issue_title")]
39    IssueTitle,
40    #[serde(rename = "issue_body")]
41    IssueBody,
42    #[serde(rename = "issue_comment")]
43    IssueComment,
44    #[serde(rename = "discussion_title")]
45    DiscussionTitle,
46    #[serde(rename = "discussion_body")]
47    DiscussionBody,
48    #[serde(rename = "discussion_comment")]
49    DiscussionComment,
50    #[serde(rename = "pull_request_title")]
51    PullRequestTitle,
52    #[serde(rename = "pull_request_body")]
53    PullRequestBody,
54    #[serde(rename = "pull_request_comment")]
55    PullRequestComment,
56    #[serde(rename = "pull_request_review")]
57    PullRequestReview,
58    #[serde(rename = "pull_request_review_comment")]
59    PullRequestReviewComment,
60}
61
62impl Default for Type {
63    fn default() -> Type {
64        Self::Commit
65    }
66}
67