/*
* CrowdStrike API Specification
*
* Use this API specification as a reference for the API endpoints you can use to interact with your Falcon environment. These endpoints support authentication via OAuth2 and interact with detections and network containment. For detailed usage guides and examples, see our [documentation inside the Falcon console](https://falcon.crowdstrike.com/support/documentation). To use the APIs described below, combine the base URL with the path shown for each API endpoint. For commercial cloud customers, your base URL is `https://api.crowdstrike.com`. Each API endpoint requires authorization via an OAuth2 token. Your first API request should retrieve an OAuth2 token using the `oauth2/token` endpoint, such as `https://api.crowdstrike.com/oauth2/token`. For subsequent requests, include the OAuth2 token in an HTTP authorization header. Tokens expire after 30 minutes, after which you should make a new token request to continue making API requests.
*
* The version of the OpenAPI document: rolling
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use std::fmt;
impl fmt::Display for DomainExecuteCommandV1 {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.id)
}
}
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainExecuteCommandV1 {
#[serde(rename = "config", skip_serializing_if = "Option::is_none")]
pub config: Option<Box<models::DomainConfigData>>,
/// Config auth type for plugin to execute. Only applicable for oneOf security scheme plugins. If not provided, it will use the default auth type on the config
#[serde(rename = "config_auth_type")]
pub config_auth_type: String,
/// ConfigID for plugin to execute. If omitted, the oldest config will be used as part of the execution.
#[serde(rename = "config_id")]
pub config_id: String,
/// ID of the definition containing the operation to execute.'
#[serde(rename = "definition_id")]
pub definition_id: String,
/// ID of the specific plugin to execute, in the format 'definition_name.operation_name'
#[serde(rename = "id")]
pub id: String,
/// The specific operation to execute.
#[serde(rename = "operation_id")]
pub operation_id: String,
#[serde(rename = "request")]
pub request: Box<models::DomainRequest>,
/// The version of the definition to execute.
#[serde(rename = "version")]
pub version: i32,
}
impl DomainExecuteCommandV1 {
pub fn new(
config_auth_type: String,
config_id: String,
definition_id: String,
id: String,
operation_id: String,
request: models::DomainRequest,
version: i32,
) -> DomainExecuteCommandV1 {
DomainExecuteCommandV1 {
config: None,
config_auth_type,
config_id,
definition_id,
id,
operation_id,
request: Box::new(request),
version,
}
}
}