misp_client_rs/models/
feed_no_id.rs

1//!
2//! MISP Automation API
3//!
4//!  ### Getting Started  MISP API allows you to query, create, modify data models, such as [Events](https://www.circl.lu/doc/misp/GLOSSARY.html#misp-event), [Objects](https://www.circl.lu/doc/misp/misp-objects/), [Attributes](https://www.circl.lu/doc/misp/GLOSSARY.html#misp-attribute). This is extremly useful for interconnecting MISP with external tools and feeding other systems with threat intel data.  It also lets you perform administrative tasks such as creating users, organisations, altering MISP settings, and much more.  To get an API key there are several options: * **[UI]** Go to [My Profile -> Auth Keys](/auth_keys/index) section and click on `+ Add authentication key`  * **[UI]** As an admin go to the the [Administration -> List Users -> View](/admin/users/view/[id]) page of the user you want to create an auth key for and on the `Auth keys` section click on `+ Add authentication key`  * **[CLI]** Use the following command: `./app/Console/cake user change_authkey [e-mail/user_id]`  * **API** Provided you already have an admin level API key, you can create an API key for another user using the `[POST]/auth_keys/add/{{user_id}}` endpoint.  > **NOTE:** The authentication key will only be displayed once, so take note of it or store it properly in your application secrets.  #### Accept and Content-Type headers  When performing your request, depending on the type of request, you might need to explicitly specify in what content  type you want to get your results. This is done by setting one of the below `Accept` headers:      Accept: application/json     Accept: application/xml  When submitting data in a `POST`, `PUT` or `DELETE` operation you also need to specify in what content-type you encoded the payload.  This is done by setting one of the below `Content-Type` headers:      Content-Type: application/json     Content-Type: application/xml  Example: ``` curl  --header \"Authorization: YOUR_API_KEY\" \\       --header \"Accept: application/json\" \\       --header \"Content-Type: application/json\" https://<misp url>/  ```  > **NOTE**: By appending .json or .xml the content type can also be set without the need for a header.  #### Automation using PyMISP  [PyMISP](https://github.com/MISP/PyMISP) is a Python library to access MISP platforms via their REST [API](https://www.circl.lu/doc/misp/GLOSSARY.html#api). It allows you to fetch events, add or update events/attributes, add or update samples or search for attributes.  ### FAQ * [Dev FAQ](https://www.circl.lu/doc/misp/dev-faq/) * [GitHub project FAQ](https://github.com/MISP/MISP/wiki/Frequently-Asked-Questions) 
5//!
6//! The version of the OpenAPI document: 2.4
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 FeedNoId {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
19    pub provider: Option<String>,
20    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
21    pub url: Option<String>,
22    /// Stringified JSON filter rules.
23    #[serde(rename = "rules", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub rules: Option<Option<String>>,
25    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
26    pub enabled: Option<bool>,
27    #[serde(rename = "distribution", skip_serializing_if = "Option::is_none")]
28    pub distribution: Option<models::DistributionLevelId>,
29    #[serde(rename = "sharing_group_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub sharing_group_id: Option<Option<String>>,
31    #[serde(rename = "tag_id", skip_serializing_if = "Option::is_none")]
32    pub tag_id: Option<String>,
33    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
34    pub default: Option<bool>,
35    #[serde(rename = "source_format", skip_serializing_if = "Option::is_none")]
36    pub source_format: Option<models::FeedSourceFormat>,
37    /// target_event option might be considered
38    #[serde(rename = "fixed_event", skip_serializing_if = "Option::is_none")]
39    pub fixed_event: Option<bool>,
40    /// Merge attributes (only add new attribute, remove revoked attributes)
41    #[serde(rename = "delta_merge", skip_serializing_if = "Option::is_none")]
42    pub delta_merge: Option<bool>,
43    #[serde(rename = "event_id", skip_serializing_if = "Option::is_none")]
44    pub event_id: Option<String>,
45    #[serde(rename = "publish", skip_serializing_if = "Option::is_none")]
46    pub publish: Option<bool>,
47    /// The IDS flags will be set to Off for this feed
48    #[serde(rename = "override_ids", skip_serializing_if = "Option::is_none")]
49    pub override_ids: Option<bool>,
50    #[serde(rename = "settings", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub settings: Option<Option<String>>,
52    #[serde(rename = "input_source", skip_serializing_if = "Option::is_none")]
53    pub input_source: Option<models::FeedInputSource>,
54    /// The IDS flags will be set to Off for this feed
55    #[serde(rename = "delete_local_file", skip_serializing_if = "Option::is_none")]
56    pub delete_local_file: Option<bool>,
57    /// The lookup will not be visible in the feed correlation
58    #[serde(rename = "lookup_visible", skip_serializing_if = "Option::is_none")]
59    pub lookup_visible: Option<bool>,
60    /// Headers to be passed with the requests. All separated by  
61    #[serde(rename = "headers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
62    pub headers: Option<Option<String>>,
63    /// The feed is cached
64    #[serde(rename = "caching_enabled", skip_serializing_if = "Option::is_none")]
65    pub caching_enabled: Option<bool>,
66    /// The IDS flags will be set to On for this feed
67    #[serde(rename = "force_to_ids", skip_serializing_if = "Option::is_none")]
68    pub force_to_ids: Option<bool>,
69    #[serde(rename = "orgc_id", skip_serializing_if = "Option::is_none")]
70    pub orgc_id: Option<String>,
71    #[serde(rename = "cache_timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
72    pub cache_timestamp: Option<Option<Box<models::FeedCacheTimestamp>>>,
73}
74
75impl FeedNoId {
76    pub fn new() -> FeedNoId {
77        FeedNoId {
78            name: None,
79            provider: None,
80            url: None,
81            rules: None,
82            enabled: None,
83            distribution: None,
84            sharing_group_id: None,
85            tag_id: None,
86            default: None,
87            source_format: None,
88            fixed_event: None,
89            delta_merge: None,
90            event_id: None,
91            publish: None,
92            override_ids: None,
93            settings: None,
94            input_source: None,
95            delete_local_file: None,
96            lookup_visible: None,
97            headers: None,
98            caching_enabled: None,
99            force_to_ids: None,
100            orgc_id: None,
101            cache_timestamp: None,
102        }
103    }
104}
105