misp_client_rs/models/
extended_galaxy_cluster.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/// ExtendedGalaxyCluster : A galaxy cluster with all it's details.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ExtendedGalaxyCluster {
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<String>,
19    #[serde(rename = "uuid", skip_serializing_if = "Option::is_none")]
20    pub uuid: Option<uuid::Uuid>,
21    #[serde(rename = "collection_uuid", skip_serializing_if = "Option::is_none")]
22    pub collection_uuid: Option<uuid::Uuid>,
23    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
24    pub r#type: Option<String>,
25    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
26    pub value: Option<String>,
27    #[serde(rename = "tag_name", skip_serializing_if = "Option::is_none")]
28    pub tag_name: Option<String>,
29    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
30    pub description: Option<String>,
31    #[serde(rename = "galaxy_id", skip_serializing_if = "Option::is_none")]
32    pub galaxy_id: Option<String>,
33    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
34    pub source: Option<String>,
35    #[serde(rename = "authors", skip_serializing_if = "Option::is_none")]
36    pub authors: Option<Vec<String>>,
37    #[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
38    pub version: Option<Option<String>>,
39    #[serde(rename = "distribution", skip_serializing_if = "Option::is_none")]
40    pub distribution: Option<models::DistributionLevelId>,
41    #[serde(rename = "sharing_group_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
42    pub sharing_group_id: Option<Option<String>>,
43    #[serde(rename = "org_id", skip_serializing_if = "Option::is_none")]
44    pub org_id: Option<String>,
45    #[serde(rename = "orgc_id", skip_serializing_if = "Option::is_none")]
46    pub orgc_id: Option<String>,
47    #[serde(rename = "default", skip_serializing_if = "Option::is_none")]
48    pub default: Option<bool>,
49    #[serde(rename = "locked", skip_serializing_if = "Option::is_none")]
50    pub locked: Option<bool>,
51    #[serde(rename = "extends_uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
52    pub extends_uuid: Option<Option<String>>,
53    #[serde(rename = "extends_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
54    pub extends_version: Option<Option<String>>,
55    #[serde(rename = "published", skip_serializing_if = "Option::is_none")]
56    pub published: Option<bool>,
57    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
58    pub deleted: Option<bool>,
59    #[serde(rename = "GalaxyElement", skip_serializing_if = "Option::is_none")]
60    pub galaxy_element: Option<Vec<models::GalaxyElement>>,
61    #[serde(rename = "Galaxy", skip_serializing_if = "Option::is_none")]
62    pub galaxy: Option<Box<models::Galaxy>>,
63    #[serde(rename = "GalaxyClusterRelation", skip_serializing_if = "Option::is_none")]
64    pub galaxy_cluster_relation: Option<Vec<models::GalaxyElement>>,
65    #[serde(rename = "Org", skip_serializing_if = "Option::is_none")]
66    pub org: Option<Box<models::Organisation>>,
67    #[serde(rename = "Orgc", skip_serializing_if = "Option::is_none")]
68    pub orgc: Option<Box<models::Organisation>>,
69    #[serde(rename = "tag_count", skip_serializing_if = "Option::is_none")]
70    pub tag_count: Option<i32>,
71    #[serde(rename = "tag_id", skip_serializing_if = "Option::is_none")]
72    pub tag_id: Option<String>,
73}
74
75impl ExtendedGalaxyCluster {
76    /// A galaxy cluster with all it's details.
77    pub fn new() -> ExtendedGalaxyCluster {
78        ExtendedGalaxyCluster {
79            id: None,
80            uuid: None,
81            collection_uuid: None,
82            r#type: None,
83            value: None,
84            tag_name: None,
85            description: None,
86            galaxy_id: None,
87            source: None,
88            authors: None,
89            version: None,
90            distribution: None,
91            sharing_group_id: None,
92            org_id: None,
93            orgc_id: None,
94            default: None,
95            locked: None,
96            extends_uuid: None,
97            extends_version: None,
98            published: None,
99            deleted: None,
100            galaxy_element: None,
101            galaxy: None,
102            galaxy_cluster_relation: None,
103            org: None,
104            orgc: None,
105            tag_count: None,
106            tag_id: None,
107        }
108    }
109}
110