/*
* 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;
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ActivitiesExternalActivity {
/// Required api scope to use this activity.
#[serde(rename = "api_scope", skip_serializing_if = "Option::is_none")]
pub api_scope: Option<String>,
/// Optional ID if the activity is exposed through an app from Store
#[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
/// The CID that owns this activity, if this is empty it is a global activity
#[serde(rename = "cid")]
pub cid: String,
/// Activity class to identify how it should be orchestrated. E.g. External, Break, CreateVariable and UpdateVariable
#[serde(rename = "class", skip_serializing_if = "Option::is_none")]
pub class: Option<String>,
/// List of dependencies (store apps or foundry app templates) of the activity
#[serde(rename = "dependencies", skip_serializing_if = "Option::is_none")]
pub dependencies: Option<Vec<models::ActivitiesDependency>>,
/// A detailed description of what this action does
#[serde(rename = "description")]
pub description: String,
/// A flag indicating whether the activity is potentially disruptive/destructive
#[serde(rename = "disruptive")]
pub disruptive: bool,
/// Unique execution route for the activity.
#[serde(rename = "execution_route", skip_serializing_if = "Option::is_none")]
pub execution_route: Option<String>,
/// Indicates whether an activity is available for the caller
#[serde(rename = "has_permission")]
pub has_permission: bool,
/// Unique ID of the activity, auto-generated by the API service
#[serde(rename = "id")]
pub id: String,
/// Input fields required for configuring activity
#[serde(rename = "input_fields", skip_serializing_if = "Option::is_none")]
pub input_fields: Option<Vec<models::ActivitiesActivityExtField>>,
#[serde(rename = "input_schema", skip_serializing_if = "Option::is_none")]
pub input_schema: Option<Box<models::JsonschemaSchema>>,
/// Legacy namespace for the activity.
#[serde(rename = "legacy_namespace", skip_serializing_if = "Option::is_none")]
pub legacy_namespace: Option<String>,
#[serde(rename = "mock_output", skip_serializing_if = "Option::is_none")]
pub mock_output: Option<serde_json::Value>,
/// UI name for displaying the activity to a user
#[serde(rename = "name")]
pub name: String,
/// (Deprecated) Unique namespace for the activity.
#[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
pub namespace: Option<String>,
/// Output fields of the activity once executed
#[serde(rename = "output_fields", skip_serializing_if = "Option::is_none")]
pub output_fields: Option<Vec<models::ActivitiesActivityExtField>>,
#[serde(rename = "output_schema", skip_serializing_if = "Option::is_none")]
pub output_schema: Option<Box<models::JsonschemaSchema>>,
/// Timestamp of when the activity was last updated
#[serde(rename = "updated", skip_serializing_if = "Option::is_none")]
pub updated: Option<String>,
/// UseCases used by this activity
#[serde(rename = "use_cases", skip_serializing_if = "Option::is_none")]
pub use_cases: Option<Vec<String>>,
/// Vendors used by this activity
#[serde(rename = "vendor", skip_serializing_if = "Option::is_none")]
pub vendor: Option<String>,
/// An incrementing version number
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<i32>,
}
impl ActivitiesExternalActivity {
pub fn new(
cid: String,
description: String,
disruptive: bool,
has_permission: bool,
id: String,
name: String,
) -> ActivitiesExternalActivity {
ActivitiesExternalActivity {
api_scope: None,
app_id: None,
cid,
class: None,
dependencies: None,
description,
disruptive,
execution_route: None,
has_permission,
id,
input_fields: None,
input_schema: None,
legacy_namespace: None,
mock_output: None,
name,
namespace: None,
output_fields: None,
output_schema: None,
updated: None,
use_cases: None,
vendor: None,
version: None,
}
}
}