openapi_github/models/
repos_update_request_security_and_analysis.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/// ReposUpdateRequestSecurityAndAnalysis : Specify which security and analysis features to enable or disable for the repository.  To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"  For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: `{ \"security_and_analysis\": {\"advanced_security\": { \"status\": \"enabled\" } } }`.  You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ReposUpdateRequestSecurityAndAnalysis {
17    #[serde(rename = "advanced_security", skip_serializing_if = "Option::is_none")]
18    pub advanced_security: Option<Box<models::ReposUpdateRequestSecurityAndAnalysisAdvancedSecurity>>,
19    #[serde(rename = "secret_scanning", skip_serializing_if = "Option::is_none")]
20    pub secret_scanning: Option<Box<models::ReposUpdateRequestSecurityAndAnalysisSecretScanning>>,
21    #[serde(rename = "secret_scanning_push_protection", skip_serializing_if = "Option::is_none")]
22    pub secret_scanning_push_protection: Option<Box<models::ReposUpdateRequestSecurityAndAnalysisSecretScanningPushProtection>>,
23}
24
25impl ReposUpdateRequestSecurityAndAnalysis {
26    /// Specify which security and analysis features to enable or disable for the repository.  To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see \"[Managing security managers in your organization](https://docs.github.com/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization).\"  For example, to enable GitHub Advanced Security, use this data in the body of the `PATCH` request: `{ \"security_and_analysis\": {\"advanced_security\": { \"status\": \"enabled\" } } }`.  You can check which security and analysis features are currently enabled by using a `GET /repos/{owner}/{repo}` request.
27    pub fn new() -> ReposUpdateRequestSecurityAndAnalysis {
28        ReposUpdateRequestSecurityAndAnalysis {
29            advanced_security: None,
30            secret_scanning: None,
31            secret_scanning_push_protection: None,
32        }
33    }
34}
35