From 8dc5caef4fede13a24bd0e78ef25307f21968f98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 03:11:49 +0000 Subject: [PATCH 1/2] build(deps): bump typify from 0.7.0 to 0.8.0 Bumps [typify](https://github.com/oxidecomputer/typify) from 0.7.0 to 0.8.0. - [Changelog](https://github.com/oxidecomputer/typify/blob/main/CHANGELOG.adoc) - [Commits](https://github.com/oxidecomputer/typify/compare/v0.7.0...v0.8.0) --- updated-dependencies: - dependency-name: typify dependency-version: 0.8.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 71 +++++++++++++++++++++++++++++++++++---- type-generator/Cargo.toml | 2 +- 2 files changed, 66 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d162b8dc..ec02a7fe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2191,6 +2191,18 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "serde_tokenstream" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db95b8acf6eca5bc1bc771a7d7fb1a0d1485bdef0c46eec2f573bbaf4b4118f8" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 3.0.4", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2304,7 +2316,7 @@ dependencies = [ "serde_json", "syn 3.0.4", "thiserror 2.0.20", - "typify", + "typify 0.7.0", ] [[package]] @@ -2714,7 +2726,7 @@ dependencies = [ "strum", "syn 3.0.4", "thiserror 2.0.20", - "typify", + "typify 0.8.0", ] [[package]] @@ -2729,8 +2741,18 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8cdc2e612ea322c6e232d46a0b34607c8eb28978fd6060ecfb139f2a50db8d5f" dependencies = [ - "typify-impl", - "typify-macro", + "typify-impl 0.7.0", + "typify-macro 0.7.0", +] + +[[package]] +name = "typify" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71187d2e983363e9a6ca884f7b061620bc6da4316902058e74bbc9d61c347696" +dependencies = [ + "typify-impl 0.8.0", + "typify-macro 0.8.0", ] [[package]] @@ -2753,6 +2775,26 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "typify-impl" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cbc3132686085f84a068ad86fc281cb3d566dd940c8911fd3562013851e9ae8" +dependencies = [ + "heck", + "log", + "proc-macro2", + "quote", + "regress 0.12.0", + "schemars", + "semver", + "serde", + "serde_json", + "syn 3.0.4", + "thiserror 2.0.20", + "unicode-ident", +] + [[package]] name = "typify-macro" version = "0.7.0" @@ -2765,9 +2807,26 @@ dependencies = [ "semver", "serde", "serde_json", - "serde_tokenstream", + "serde_tokenstream 0.2.3", "syn 2.0.117", - "typify-impl", + "typify-impl 0.7.0", +] + +[[package]] +name = "typify-macro" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3a7f8d08ec85254fb8b383a6c66fe43b81f7f6b288fa71eb365f0867fc8f3a6" +dependencies = [ + "proc-macro2", + "quote", + "schemars", + "semver", + "serde", + "serde_json", + "serde_tokenstream 0.3.0", + "syn 3.0.4", + "typify-impl 0.8.0", ] [[package]] diff --git a/type-generator/Cargo.toml b/type-generator/Cargo.toml index 1274d0ed..30b40bf3 100644 --- a/type-generator/Cargo.toml +++ b/type-generator/Cargo.toml @@ -21,7 +21,7 @@ serde_json = "1" syn = "3" thiserror = "2" json_dotpath = "1" -typify = "0.7" +typify = "0.8" prettyplease = "0.3" quote = "1" proc-macro2 = "1" From 134628195f27b87e84802dbf6fa5e15cc8cf2302 Mon Sep 17 00:00:00 2001 From: "asset-sync[bot]" Date: Mon, 14 Sep 2026 03:13:56 +0000 Subject: [PATCH 2/2] chore: sync assets via workflow --- csaf-rs/src/schema/csaf2_0/schema.rs | 5624 +------------- .../src/schema/csaf2_0/testcases_schema.rs | 332 +- csaf-rs/src/schema/csaf2_1/schema.rs | 6912 +---------------- .../src/schema/csaf2_1/testcases_schema.rs | 360 +- 4 files changed, 473 insertions(+), 12755 deletions(-) diff --git a/csaf-rs/src/schema/csaf2_0/schema.rs b/csaf-rs/src/schema/csaf2_0/schema.rs index b0358684..77b8ebe0 100644 --- a/csaf-rs/src/schema/csaf2_0/schema.rs +++ b/csaf-rs/src/schema/csaf2_0/schema.rs @@ -6,198 +6,28 @@ #![allow(clippy::all)] #![cfg_attr(any(), rustfmt::skip)] #![allow(rustdoc::all)] -/// Error types. -pub mod error { - /// Error from a `TryFrom` or `FromStr` implementation. - pub struct ConversionError(::std::borrow::Cow<'static, str>); - impl ::std::error::Error for ConversionError {} - impl ::std::fmt::Display for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Display::fmt(&self.0, f) - } - } - impl ::std::fmt::Debug for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Debug::fmt(&self.0, f) - } - } - impl From<&'static str> for ConversionError { - fn from(value: &'static str) -> Self { - Self(value.into()) - } - } - impl From for ConversionError { - fn from(value: String) -> Self { - Self(value.into()) - } - } -} ///Acknowledges contributions by describing those that contributed. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Acknowledgment", -/// "description": "Acknowledges contributions by describing those that contributed.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "names": { -/// "title": "List of acknowledged names", -/// "description": "Contains the names of contributors being recognized.", -/// "type": "array", -/// "items": { -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "organization": { -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "summary": { -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "urls": { -/// "title": "List of URLs", -/// "description": "Specifies a list of URLs or location of the reference to be acknowledged.", -/// "type": "array", -/// "items": { -/// "title": "URL of acknowledgment", -/// "description": "Contains the URL or location of the reference to be acknowledged.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct Acknowledgment { ///Contains the names of contributors being recognized. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub names: ::std::vec::Vec, ///Contains the name of a contributing organization being recognized. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub organization: ::std::option::Option, ///SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option, ///Specifies a list of URLs or location of the reference to be acknowledged. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub urls: ::std::vec::Vec<::std::string::String>, } -impl ::std::default::Default for Acknowledgment { - fn default() -> Self { - Self { - names: Default::default(), - organization: Default::default(), - summary: Default::default(), - urls: Default::default(), - } - } -} impl Acknowledgment { pub fn builder() -> builder::Acknowledgment { Default::default() } } ///Contains a list of acknowledgment elements. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of acknowledgments", -/// "description": "Contains a list of acknowledgment elements.", -/// "type": "array", -/// "items": { -/// "title": "Acknowledgment", -/// "description": "Acknowledges contributions by describing those that contributed.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "names": { -/// "title": "List of acknowledged names", -/// "description": "Contains the names of contributors being recognized.", -/// "type": "array", -/// "items": { -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "organization": { -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "summary": { -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "urls": { -/// "title": "List of URLs", -/// "description": "Specifies a list of URLs or location of the reference to be acknowledged.", -/// "type": "array", -/// "items": { -/// "title": "URL of acknowledgment", -/// "description": "Contains the URL or location of the reference to be acknowledged.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// } -/// } -/// }, -/// "minItems": 1 -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct AcknowledgmentsT(pub ::std::vec::Vec); @@ -218,18 +48,6 @@ impl ::std::convert::From<::std::vec::Vec> for AcknowledgmentsT } } ///Provides additional information for the restart. This can include details on procedures, scope or impact. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AdditionalRestartInformation(::std::string::String); @@ -263,14 +81,6 @@ impl ::std::convert::TryFrom<&str> for AdditionalRestartInformation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AdditionalRestartInformation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AdditionalRestartInformation { type Error = self::error::ConversionError; fn try_from( @@ -292,42 +102,10 @@ impl<'de> ::serde::Deserialize<'de> for AdditionalRestartInformation { } } ///Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct AggregateSeverity { ///Points to the namespace so referenced. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub namespace: ::std::option::Option<::std::string::String>, ///Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS). pub text: TextOfAggregateSeverity, @@ -338,26 +116,6 @@ impl AggregateSeverity { } } ///Contains the name of the cryptographic hash algorithm used to calculate the value. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AlgorithmOfTheCryptographicHash(::std::string::String); @@ -396,15 +154,6 @@ impl ::std::convert::TryFrom<&str> for AlgorithmOfTheCryptographicHash { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> -for AlgorithmOfTheCryptographicHash { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AlgorithmOfTheCryptographicHash { type Error = self::error::ConversionError; fn try_from( @@ -426,21 +175,6 @@ impl<'de> ::serde::Deserialize<'de> for AlgorithmOfTheCryptographicHash { } } ///Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AlternateName(::std::string::String); @@ -474,14 +208,6 @@ impl ::std::convert::TryFrom<&str> for AlternateName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AlternateName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AlternateName { type Error = self::error::ConversionError; fn try_from( @@ -503,24 +229,6 @@ impl<'de> ::serde::Deserialize<'de> for AlternateName { } } ///Indicates who is intended to read it. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AudienceOfNote(::std::string::String); @@ -554,14 +262,6 @@ impl ::std::convert::TryFrom<&str> for AudienceOfNote { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AudienceOfNote { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AudienceOfNote { type Error = self::error::ConversionError; fn try_from( @@ -583,75 +283,15 @@ impl<'de> ::serde::Deserialize<'de> for AudienceOfNote { } } ///Is a part of the hierarchical structure of the product tree. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Branch", -/// "description": "Is a part of the hierarchical structure of the product tree.", -/// "type": "object", -/// "maxProperties": 3, -/// "minProperties": 3, -/// "required": [ -/// "category", -/// "name" -/// ], -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "category": { -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "legacy", -/// "patch_level", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -/// }, -/// "name": { -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product": { -/// "$ref": "#/$defs/full_product_name_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Branch { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub branches: ::std::option::Option, ///Describes the characteristics of the labeled branch. pub category: CategoryOfTheBranch, ///Contains the canonical descriptor or 'friendly name' of the branch. pub name: NameOfTheBranch, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product: ::std::option::Option, } impl Branch { @@ -660,72 +300,6 @@ impl Branch { } } ///Contains branch elements as children of the current element. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of branches", -/// "description": "Contains branch elements as children of the current element.", -/// "type": "array", -/// "items": { -/// "title": "Branch", -/// "description": "Is a part of the hierarchical structure of the product tree.", -/// "type": "object", -/// "maxProperties": 3, -/// "minProperties": 3, -/// "required": [ -/// "category", -/// "name" -/// ], -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "category": { -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "legacy", -/// "patch_level", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -/// }, -/// "name": { -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product": { -/// "$ref": "#/$defs/full_product_name_t" -/// } -/// } -/// }, -/// "minItems": 1 -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct BranchesT(pub ::std::vec::Vec); @@ -746,25 +320,6 @@ impl ::std::convert::From<::std::vec::Vec> for BranchesT { } } ///Provides information about the category of publisher releasing the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -827,14 +382,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfPublisher { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfPublisher { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfPublisher { type Error = self::error::ConversionError; fn try_from( @@ -844,22 +391,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfPublisher { } } ///Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -906,14 +437,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfReference { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfReference { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfReference { type Error = self::error::ConversionError; fn try_from( @@ -928,28 +451,6 @@ impl ::std::default::Default for CategoryOfReference { } } ///Specifies what category of restart is required by this remediation to become effective. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1024,14 +525,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfRestart { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfRestart { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfRestart { type Error = self::error::ConversionError; fn try_from( @@ -1041,31 +534,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfRestart { } } ///Describes the characteristics of the labeled branch. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "legacy", -/// "patch_level", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1152,14 +620,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheBranch { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheBranch { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheBranch { type Error = self::error::ConversionError; fn try_from( @@ -1169,24 +629,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheBranch { } } ///Specifies the category which this remediation belongs to. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "vendor_fix", -/// "workaround" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1245,14 +687,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -1262,22 +696,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheRemediation } } ///Categorizes the threat according to the rules of the specification. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1328,14 +746,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheThreat { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheThreat { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheThreat { type Error = self::error::ConversionError; fn try_from( @@ -1345,19 +755,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheThreat { } } ///The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct CommonPlatformEnumerationRepresentation(::std::string::String); @@ -1405,15 +802,6 @@ impl ::std::convert::TryFrom<&str> for CommonPlatformEnumerationRepresentation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> -for CommonPlatformEnumerationRepresentation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CommonPlatformEnumerationRepresentation { type Error = self::error::ConversionError; @@ -1436,920 +824,10 @@ impl<'de> ::serde::Deserialize<'de> for CommonPlatformEnumerationRepresentation } } ///Representation of security advisory information as a JSON document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "$id": "https://docs.oasis-open.org/csaf/csaf/v2.0/csaf_json_schema.json", -/// "title": "Common Security Advisory Framework", -/// "description": "Representation of security advisory information as a JSON document.", -/// "type": "object", -/// "required": [ -/// "document" -/// ], -/// "properties": { -/// "document": { -/// "title": "Document level meta-data", -/// "description": "Captures the meta-data about this document describing a particular set of security advisories.", -/// "type": "object", -/// "required": [ -/// "category", -/// "csaf_version", -/// "publisher", -/// "title", -/// "tracking" -/// ], -/// "properties": { -/// "acknowledgments": { -/// "title": "Document acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with the whole document.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "aggregate_severity": { -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "category": { -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "csaf_version": { -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.0" -/// ] -/// }, -/// "distribution": { -/// "title": "Rules for sharing document", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "GREEN", -/// "RED", -/// "WHITE" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// } -/// } -/// } -/// }, -/// "lang": { -/// "title": "Document language", -/// "description": "Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "notes": { -/// "title": "Document notes", -/// "description": "Holds notes associated with the whole document.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "publisher": { -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// } -/// }, -/// "references": { -/// "title": "Document references", -/// "description": "Holds a list of references associated with the whole document.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "source_lang": { -/// "title": "Source language", -/// "description": "If this copy of the document is a translation then the value of this property describes from which language this document was translated.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "title": { -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tracking": { -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// } -/// } -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first published.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// } -/// } -/// } -/// }, -/// "product_tree": { -/// "title": "Product tree", -/// "description": "Is a container for all fully qualified product names that can be referenced elsewhere in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "full_product_names": { -/// "title": "List of full product names", -/// "description": "Contains a list of full product names.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "minItems": 1 -/// }, -/// "product_groups": { -/// "title": "List of product groups", -/// "description": "Contains a list of product groups.", -/// "type": "array", -/// "items": { -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "relationships": { -/// "title": "List of relationships", -/// "description": "Contains a list of relationships.", -/// "type": "array", -/// "items": { -/// "title": "Relationship", -/// "description": "Establishes a link between two existing full_product_name_t elements, allowing the document producer to define a combination of two products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "category", -/// "full_product_name", -/// "product_reference", -/// "relates_to_product_reference" -/// ], -/// "properties": { -/// "category": { -/// "title": "Relationship category", -/// "description": "Defines the category of relationship for the referenced component.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "product_reference": { -/// "title": "Product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the first element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "relates_to_product_reference": { -/// "title": "Relates to product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the second element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// } -/// } -/// }, -/// "vulnerabilities": { -/// "title": "Vulnerabilities", -/// "description": "Represents a list of all relevant vulnerability information items.", -/// "type": "array", -/// "items": { -/// "title": "Vulnerability", -/// "description": "Is a container for the aggregation of all fields that are related to a single vulnerability in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "acknowledgments": { -/// "title": "Vulnerability acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with this vulnerability item.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "cve": { -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -/// }, -/// "cwe": { -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "discovery_date": { -/// "title": "Discovery date", -/// "description": "Holds the date and time the vulnerability was originally discovered.", -/// "type": "string" -/// }, -/// "flags": { -/// "title": "List of flags", -/// "description": "Contains a list of machine readable flags.", -/// "type": "array", -/// "items": { -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "ids": { -/// "title": "List of IDs", -/// "description": "Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists).", -/// "type": "array", -/// "items": { -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "involvements": { -/// "title": "List of involvements", -/// "description": "Contains a list of involvements.", -/// "type": "array", -/// "items": { -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "notes": { -/// "title": "Vulnerability notes", -/// "description": "Holds notes associated with this vulnerability item.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "product_status": { -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "references": { -/// "title": "Vulnerability references", -/// "description": "Holds a list of references associated with this vulnerability item.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "release_date": { -/// "title": "Release date", -/// "description": "Holds the date and time the vulnerability was originally released into the wild.", -/// "type": "string" -/// }, -/// "remediations": { -/// "title": "List of remediations", -/// "description": "Contains a list of remediations.", -/// "type": "array", -/// "items": { -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on category of restart is required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "scores": { -/// "title": "List of scores", -/// "description": "Contains score objects for the current vulnerability.", -/// "type": "array", -/// "items": { -/// "title": "Score", -/// "description": "Specifies information about (at least one) score of the vulnerability and for which products the given value applies.", -/// "type": "object", -/// "minProperties": 2, -/// "required": [ -/// "products" -/// ], -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "threats": { -/// "title": "List of threats", -/// "description": "Contains information about a vulnerability that can change with time.", -/// "type": "array", -/// "items": { -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "title": { -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct CommonSecurityAdvisoryFramework { pub document: DocumentLevelMetaData, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_tree: ::std::option::Option, ///Represents a list of all relevant vulnerability information items. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] @@ -2361,21 +839,6 @@ impl CommonSecurityAdvisoryFramework { } } ///Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ContactDetails(::std::string::String); @@ -2409,14 +872,6 @@ impl ::std::convert::TryFrom<&str> for ContactDetails { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ContactDetails { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ContactDetails { type Error = self::error::ConversionError; fn try_from( @@ -2438,23 +893,6 @@ impl<'de> ::serde::Deserialize<'de> for ContactDetails { } } ///Contains the name of a contributing organization being recognized. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ContributingOrganization(::std::string::String); @@ -2488,14 +926,6 @@ impl ::std::convert::TryFrom<&str> for ContributingOrganization { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ContributingOrganization { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ContributingOrganization { type Error = self::error::ConversionError; fn try_from( @@ -2517,77 +947,6 @@ impl<'de> ::serde::Deserialize<'de> for ContributingOrganization { } } ///Contains all information to identify a file based on its cryptographic hash values. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-fA-F]{32,}$" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct CryptographicHashes { ///Contains a list of cryptographic hashes for this file. @@ -2601,20 +960,6 @@ impl CryptographicHashes { } } ///Gives the version of the CSAF specification which the document was generated for. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.0" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -2657,14 +1002,6 @@ impl ::std::convert::TryFrom<&str> for CsafVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CsafVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CsafVersion { type Error = self::error::ConversionError; fn try_from( @@ -2674,18 +1011,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CsafVersion { } } ///Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Cve(::std::string::String); @@ -2721,14 +1046,6 @@ impl ::std::convert::TryFrom<&str> for Cve { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Cve { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Cve { type Error = self::error::ConversionError; fn try_from( @@ -2750,45 +1067,6 @@ impl<'de> ::serde::Deserialize<'de> for Cve { } } ///Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Cwe { ///Holds the ID for the weakness associated. @@ -2802,18 +1080,6 @@ impl Cwe { } } ///Contains a thorough human-readable discussion of the remediation. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DetailsOfTheRemediation(::std::string::String); @@ -2847,14 +1113,6 @@ impl ::std::convert::TryFrom<&str> for DetailsOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DetailsOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DetailsOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -2876,18 +1134,6 @@ impl<'de> ::serde::Deserialize<'de> for DetailsOfTheRemediation { } } ///Represents a thorough human-readable discussion of the threat. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DetailsOfTheThreat(::std::string::String); @@ -2921,14 +1167,6 @@ impl ::std::convert::TryFrom<&str> for DetailsOfTheThreat { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DetailsOfTheThreat { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DetailsOfTheThreat { type Error = self::error::ConversionError; fn try_from( @@ -2950,25 +1188,6 @@ impl<'de> ::serde::Deserialize<'de> for DetailsOfTheThreat { } } ///Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DocumentCategory(::std::string::String); @@ -3009,14 +1228,6 @@ impl ::std::convert::TryFrom<&str> for DocumentCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DocumentCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DocumentCategory { type Error = self::error::ConversionError; fn try_from( @@ -3038,63 +1249,10 @@ impl<'de> ::serde::Deserialize<'de> for DocumentCategory { } } ///Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct DocumentGenerator { ///This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, pub engine: EngineOfDocumentGeneration, } @@ -3104,397 +1262,31 @@ impl DocumentGenerator { } } ///Captures the meta-data about this document describing a particular set of security advisories. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Document level meta-data", -/// "description": "Captures the meta-data about this document describing a particular set of security advisories.", -/// "type": "object", -/// "required": [ -/// "category", -/// "csaf_version", -/// "publisher", -/// "title", -/// "tracking" -/// ], -/// "properties": { -/// "acknowledgments": { -/// "title": "Document acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with the whole document.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "aggregate_severity": { -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "category": { -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "csaf_version": { -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.0" -/// ] -/// }, -/// "distribution": { -/// "title": "Rules for sharing document", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "GREEN", -/// "RED", -/// "WHITE" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// } -/// } -/// } -/// }, -/// "lang": { -/// "title": "Document language", -/// "description": "Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "notes": { -/// "title": "Document notes", -/// "description": "Holds notes associated with the whole document.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "publisher": { -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// } -/// }, -/// "references": { -/// "title": "Document references", -/// "description": "Holds a list of references associated with the whole document.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "source_lang": { -/// "title": "Source language", -/// "description": "If this copy of the document is a translation then the value of this property describes from which language this document was translated.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "title": { -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tracking": { -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// } -/// } -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first published.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// } -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct DocumentLevelMetaData { ///Contains a list of acknowledgment elements associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub acknowledgments: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub aggregate_severity: ::std::option::Option, ///Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document. pub category: DocumentCategory, ///Gives the version of the CSAF specification which the document was generated for. pub csaf_version: CsafVersion, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub distribution: ::std::option::Option, ///Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub lang: ::std::option::Option, ///Holds notes associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub notes: ::std::option::Option, pub publisher: Publisher, ///Holds a list of references associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub references: ::std::option::Option, ///If this copy of the document is a translation then the value of this property describes from which language this document was translated. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub source_lang: ::std::option::Option, ///This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents. pub title: TitleOfThisDocument, @@ -3506,22 +1298,6 @@ impl DocumentLevelMetaData { } } ///Defines the draft status of the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -3572,14 +1348,6 @@ impl ::std::convert::TryFrom<&str> for DocumentStatus { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DocumentStatus { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DocumentStatus { type Error = self::error::ConversionError; fn try_from( @@ -3589,23 +1357,6 @@ impl ::std::convert::TryFrom<::std::string::String> for DocumentStatus { } } ///Represents the name of the engine that generated the CSAF document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EngineName(::std::string::String); @@ -3639,14 +1390,6 @@ impl ::std::convert::TryFrom<&str> for EngineName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EngineName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EngineName { type Error = self::error::ConversionError; fn try_from( @@ -3668,50 +1411,12 @@ impl<'de> ::serde::Deserialize<'de> for EngineName { } } ///Contains information about the engine that generated the CSAF document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct EngineOfDocumentGeneration { ///Represents the name of the engine that generated the CSAF document. pub name: EngineName, ///Contains the version of the engine that generated the CSAF document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub version: ::std::option::Option, } impl EngineOfDocumentGeneration { @@ -3720,23 +1425,6 @@ impl EngineOfDocumentGeneration { } } ///Contains the version of the engine that generated the CSAF document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EngineVersion(::std::string::String); @@ -3770,14 +1458,6 @@ impl ::std::convert::TryFrom<&str> for EngineVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EngineVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EngineVersion { type Error = self::error::ConversionError; fn try_from( @@ -3799,18 +1479,6 @@ impl<'de> ::serde::Deserialize<'de> for EngineVersion { } } ///Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EntitlementOfTheRemediation(::std::string::String); @@ -3844,14 +1512,6 @@ impl ::std::convert::TryFrom<&str> for EntitlementOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EntitlementOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EntitlementOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -3873,49 +1533,6 @@ impl<'de> ::serde::Deserialize<'de> for EntitlementOfTheRemediation { } } ///Contains one hash value and algorithm of the file to be identified. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-fA-F]{32,}$" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct FileHash { ///Contains the name of the cryptographic hash algorithm used to calculate the value. @@ -3929,23 +1546,6 @@ impl FileHash { } } ///Contains the name of the file which is identified by the hash values. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Filename(::std::string::String); @@ -3979,14 +1579,6 @@ impl ::std::convert::TryFrom<&str> for Filename { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Filename { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Filename { type Error = self::error::ConversionError; fn try_from( @@ -4008,55 +1600,16 @@ impl<'de> ::serde::Deserialize<'de> for Filename { } } ///Contains product specific information in regard to this vulnerability as a single machine readable flag. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Flag { ///Contains the date when assessment was done or the flag was assigned. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option, ///Specifies the machine readable label. pub label: LabelOfTheFlag, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option, } impl Flag { @@ -4065,211 +1618,12 @@ impl Flag { } } ///Specifies information about the product and assigns the product_id. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Full product name", -/// "description": "Specifies information about the product and assigns the product_id.", -/// "type": "object", -/// "required": [ -/// "name", -/// "product_id" -/// ], -/// "properties": { -/// "name": { -/// "title": "Textual description of the product", -/// "description": "The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.", -/// "examples": [ -/// "Cisco AnyConnect Secure Mobility Client 2.3.185", -/// "Microsoft Host Integration Server 2006 Service Pack 1" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product_id": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "product_identification_helper": { -/// "title": "Helper to identify the product", -/// "description": "Provides at least one method which aids in identifying the product in an asset database.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cpe": { -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$" -/// }, -/// "hashes": { -/// "title": "List of hashes", -/// "description": "Contains a list of cryptographic hashes usable to identify files.", -/// "type": "array", -/// "items": { -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-fA-F]{32,}$" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "model_numbers": { -/// "title": "List of models", -/// "description": "Contains a list of full or abbreviated (partial) model numbers.", -/// "type": "array", -/// "items": { -/// "title": "Model number", -/// "description": "Contains a full or abbreviated (partial) model number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "purl": { -/// "title": "package URL representation", -/// "description": "The package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[A-Za-z\\.\\-\\+][A-Za-z0-9\\.\\-\\+]*/.+" -/// }, -/// "sbom_urls": { -/// "title": "List of SBOM URLs", -/// "description": "Contains a list of URLs where SBOMs for this product can be retrieved.", -/// "type": "array", -/// "items": { -/// "title": "SBOM URL", -/// "description": "Contains a URL of one SBOM for this product.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// }, -/// "serial_numbers": { -/// "title": "List of serial numbers", -/// "description": "Contains a list of full or abbreviated (partial) serial numbers.", -/// "type": "array", -/// "items": { -/// "title": "Serial number", -/// "description": "Contains a full or abbreviated (partial) serial number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "skus": { -/// "title": "List of stock keeping units", -/// "description": "Contains a list of full or abbreviated (partial) stock keeping units.", -/// "type": "array", -/// "items": { -/// "title": "Stock keeping unit", -/// "description": "Contains a full or abbreviated (partial) stock keeping unit (SKU) which is used in the ordering process to identify the component.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "x_generic_uris": { -/// "title": "List of generic URIs", -/// "description": "Contains a list of identifiers which are either vendor-specific or derived from a standard not yet supported.", -/// "type": "array", -/// "items": { -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// } -/// }, -/// "minItems": 1 -/// } -/// } -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct FullProductNameT { ///The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document. pub name: TextualDescriptionOfTheProduct, pub product_id: ProductIdT, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_identification_helper: ::std::option::Option, } impl FullProductNameT { @@ -4278,33 +1632,6 @@ impl FullProductNameT { } } ///Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct GenericUri { ///Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid. @@ -4318,201 +1645,26 @@ impl GenericUri { } } ///Provides at least one method which aids in identifying the product in an asset database. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Helper to identify the product", -/// "description": "Provides at least one method which aids in identifying the product in an asset database.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cpe": { -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^(cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6})$" -/// }, -/// "hashes": { -/// "title": "List of hashes", -/// "description": "Contains a list of cryptographic hashes usable to identify files.", -/// "type": "array", -/// "items": { -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-fA-F]{32,}$" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "model_numbers": { -/// "title": "List of models", -/// "description": "Contains a list of full or abbreviated (partial) model numbers.", -/// "type": "array", -/// "items": { -/// "title": "Model number", -/// "description": "Contains a full or abbreviated (partial) model number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "purl": { -/// "title": "package URL representation", -/// "description": "The package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[A-Za-z\\.\\-\\+][A-Za-z0-9\\.\\-\\+]*/.+" -/// }, -/// "sbom_urls": { -/// "title": "List of SBOM URLs", -/// "description": "Contains a list of URLs where SBOMs for this product can be retrieved.", -/// "type": "array", -/// "items": { -/// "title": "SBOM URL", -/// "description": "Contains a URL of one SBOM for this product.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// }, -/// "serial_numbers": { -/// "title": "List of serial numbers", -/// "description": "Contains a list of full or abbreviated (partial) serial numbers.", -/// "type": "array", -/// "items": { -/// "title": "Serial number", -/// "description": "Contains a full or abbreviated (partial) serial number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "skus": { -/// "title": "List of stock keeping units", -/// "description": "Contains a list of full or abbreviated (partial) stock keeping units.", -/// "type": "array", -/// "items": { -/// "title": "Stock keeping unit", -/// "description": "Contains a full or abbreviated (partial) stock keeping unit (SKU) which is used in the ordering process to identify the component.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "x_generic_uris": { -/// "title": "List of generic URIs", -/// "description": "Contains a list of identifiers which are either vendor-specific or derived from a standard not yet supported.", -/// "type": "array", -/// "items": { -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// } -/// }, -/// "minItems": 1 -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct HelperToIdentifyTheProduct { ///The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub cpe: ::std::option::Option, ///Contains a list of cryptographic hashes usable to identify files. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub hashes: ::std::vec::Vec, ///Contains a list of full or abbreviated (partial) model numbers. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub model_numbers: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub model_numbers: ::std::option::Option<::std::vec::Vec>, ///The package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub purl: ::std::option::Option, ///Contains a list of URLs where SBOMs for this product can be retrieved. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub sbom_urls: ::std::vec::Vec<::std::string::String>, ///Contains a list of full or abbreviated (partial) serial numbers. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub serial_numbers: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub serial_numbers: ::std::option::Option<::std::vec::Vec>, ///Contains a list of full or abbreviated (partial) stock keeping units. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub skus: ::std::vec::Vec, @@ -4520,63 +1672,12 @@ pub struct HelperToIdentifyTheProduct { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub x_generic_uris: ::std::vec::Vec, } -impl ::std::default::Default for HelperToIdentifyTheProduct { - fn default() -> Self { - Self { - cpe: Default::default(), - hashes: Default::default(), - model_numbers: Default::default(), - purl: Default::default(), - sbom_urls: Default::default(), - serial_numbers: Default::default(), - skus: Default::default(), - x_generic_uris: Default::default(), - } - } -} impl HelperToIdentifyTheProduct { pub fn builder() -> builder::HelperToIdentifyTheProduct { Default::default() } } ///Contains a single unique label or tracking ID for the vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Id { ///Indicates the name of the vulnerability tracking or numbering system. @@ -4590,70 +1691,17 @@ impl Id { } } ///Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Involvement { ///Holds the date and time of the involvement entry. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, ///Defines the category of the involved party. pub party: PartyCategory, ///Defines contact status of the involved party. pub status: PartyStatus, ///Contains additional context regarding what is going on. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option, } impl Involvement { @@ -4662,18 +1710,6 @@ impl Involvement { } } ///Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct IssuingAuthority(::std::string::String); @@ -4707,14 +1743,6 @@ impl ::std::convert::TryFrom<&str> for IssuingAuthority { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for IssuingAuthority { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for IssuingAuthority { type Error = self::error::ConversionError; fn try_from( @@ -4736,24 +1764,6 @@ impl<'de> ::serde::Deserialize<'de> for IssuingAuthority { } } ///Specifies the machine readable label. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -4822,14 +1832,6 @@ impl ::std::convert::TryFrom<&str> for LabelOfTheFlag { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LabelOfTheFlag { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LabelOfTheFlag { type Error = self::error::ConversionError; fn try_from( @@ -4839,23 +1841,6 @@ impl ::std::convert::TryFrom<::std::string::String> for LabelOfTheFlag { } } ///Provides the TLP label of the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "GREEN", -/// "RED", -/// "WHITE" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -4910,14 +1895,6 @@ impl ::std::convert::TryFrom<&str> for LabelOfTlp { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LabelOfTlp { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LabelOfTlp { type Error = self::error::ConversionError; fn try_from( @@ -4927,25 +1904,6 @@ impl ::std::convert::TryFrom<::std::string::String> for LabelOfTlp { } } ///Identifies a language, corresponding to IETF BCP 47 / RFC 5646. See IETF language registry: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Language type", -/// "description": "Identifies a language, corresponding to IETF BCP 47 / RFC 5646. See IETF language registry: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry", -/// "examples": [ -/// "de", -/// "en", -/// "fr", -/// "frc", -/// "jp" -/// ], -/// "type": "string", -/// "pattern": "^(([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3}){0,2})?|[A-Za-z]{4,8})(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-[A-WY-Za-wy-z0-9](-[A-Za-z0-9]{2,8})+)*(-[Xx](-[A-Za-z0-9]{1,8})+)?|[Xx](-[A-Za-z0-9]{1,8})+|[Ii]-[Dd][Ee][Ff][Aa][Uu][Ll][Tt]|[Ii]-[Mm][Ii][Nn][Gg][Oo])$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct LangT(::std::string::String); @@ -4989,14 +1947,6 @@ impl ::std::convert::TryFrom<&str> for LangT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LangT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LangT { type Error = self::error::ConversionError; fn try_from( @@ -5018,18 +1968,6 @@ impl<'de> ::serde::Deserialize<'de> for LangT { } } ///Contains the version string used in an existing document with the same content. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct LegacyVersionOfTheRevision(::std::string::String); @@ -5063,14 +2001,6 @@ impl ::std::convert::TryFrom<&str> for LegacyVersionOfTheRevision { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LegacyVersionOfTheRevision { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LegacyVersionOfTheRevision { type Error = self::error::ConversionError; fn try_from( @@ -5092,18 +2022,6 @@ impl<'de> ::serde::Deserialize<'de> for LegacyVersionOfTheRevision { } } ///Contains a full or abbreviated (partial) model number of the component to identify. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Model number", -/// "description": "Contains a full or abbreviated (partial) model number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ModelNumber(::std::string::String); @@ -5137,14 +2055,6 @@ impl ::std::convert::TryFrom<&str> for ModelNumber { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ModelNumber { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ModelNumber { type Error = self::error::ConversionError; fn try_from( @@ -5166,23 +2076,6 @@ impl<'de> ::serde::Deserialize<'de> for ModelNumber { } } ///Contains the name of the issuing party. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfPublisher(::std::string::String); @@ -5216,14 +2109,6 @@ impl ::std::convert::TryFrom<&str> for NameOfPublisher { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfPublisher { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfPublisher { type Error = self::error::ConversionError; fn try_from( @@ -5245,28 +2130,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfPublisher { } } ///Contains the canonical descriptor or 'friendly name' of the branch. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheBranch(::std::string::String); @@ -5300,14 +2163,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheBranch { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheBranch { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheBranch { type Error = self::error::ConversionError; fn try_from( @@ -5329,22 +2184,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheBranch { } } ///Contains the name of a single contributor being recognized. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheContributor(::std::string::String); @@ -5378,14 +2217,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheContributor { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheContributor { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheContributor { type Error = self::error::ConversionError; fn try_from( @@ -5407,78 +2238,17 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheContributor { } } ///Is a place to put all manner of text blobs related to the current context. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Note", -/// "description": "Is a place to put all manner of text blobs related to the current context.", -/// "type": "object", -/// "required": [ -/// "category", -/// "text" -/// ], -/// "properties": { -/// "audience": { -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "category": { -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -/// }, -/// "text": { -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "title": { -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Note { ///Indicates who is intended to read it. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub audience: ::std::option::Option, ///Contains the information of what kind of note this is. pub category: NoteCategory, ///Holds the content of the note. Content varies depending on type. pub text: NoteContent, ///Provides a concise description of what is contained in the text of the note. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub title: ::std::option::Option, } impl Note { @@ -5487,26 +2257,6 @@ impl Note { } } ///Contains the information of what kind of note this is. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -5573,14 +2323,6 @@ impl ::std::convert::TryFrom<&str> for NoteCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NoteCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NoteCategory { type Error = self::error::ConversionError; fn try_from( @@ -5590,18 +2332,6 @@ impl ::std::convert::TryFrom<::std::string::String> for NoteCategory { } } ///Holds the content of the note. Content varies depending on type. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NoteContent(::std::string::String); @@ -5635,14 +2365,6 @@ impl ::std::convert::TryFrom<&str> for NoteContent { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NoteContent { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NoteContent { type Error = self::error::ConversionError; fn try_from( @@ -5664,73 +2386,6 @@ impl<'de> ::serde::Deserialize<'de> for NoteContent { } } ///Contains notes which are specific to the current context. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of notes", -/// "description": "Contains notes which are specific to the current context.", -/// "type": "array", -/// "items": { -/// "title": "Note", -/// "description": "Is a place to put all manner of text blobs related to the current context.", -/// "type": "object", -/// "required": [ -/// "category", -/// "text" -/// ], -/// "properties": { -/// "audience": { -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "category": { -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -/// }, -/// "text": { -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "title": { -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct NotesT(pub ::std::vec::Vec); @@ -5751,19 +2406,6 @@ impl ::std::convert::From<::std::vec::Vec> for NotesT { } } ///The package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "package URL representation", -/// "description": "The package URL (purl) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[A-Za-z\\.\\-\\+][A-Za-z0-9\\.\\-\\+]*/.+" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct PackageUrlRepresentation(::std::string::String); @@ -5808,14 +2450,6 @@ impl ::std::convert::TryFrom<&str> for PackageUrlRepresentation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PackageUrlRepresentation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PackageUrlRepresentation { type Error = self::error::ConversionError; fn try_from( @@ -5837,24 +2471,6 @@ impl<'de> ::serde::Deserialize<'de> for PackageUrlRepresentation { } } ///Defines the category of the involved party. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -5913,14 +2529,6 @@ impl ::std::convert::TryFrom<&str> for PartyCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PartyCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PartyCategory { type Error = self::error::ConversionError; fn try_from( @@ -5930,25 +2538,6 @@ impl ::std::convert::TryFrom<::std::string::String> for PartyCategory { } } ///Defines contact status of the involved party. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -6011,14 +2600,6 @@ impl ::std::convert::TryFrom<&str> for PartyStatus { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PartyStatus { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PartyStatus { type Error = self::error::ConversionError; fn try_from( @@ -6028,53 +2609,13 @@ impl ::std::convert::TryFrom<::std::string::String> for PartyStatus { } } ///Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct ProductGroup { pub group_id: ProductGroupIdT, ///Lists the product_ids of those products which known as one group in the document. - pub product_ids: Vec, + pub product_ids: ::std::vec::Vec, ///Gives a short, optional description of the group. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option, } impl ProductGroup { @@ -6083,23 +2624,6 @@ impl ProductGroup { } } ///Token required to identify a group of products so that it can be referred to from other parts in the document. There is no predefined or required format for the product_group_id as long as it uniquely identifies a group in the context of the current document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Reference token for product group instance", -/// "description": "Token required to identify a group of products so that it can be referred to from other parts in the document. There is no predefined or required format for the product_group_id as long as it uniquely identifies a group in the context of the current document.", -/// "examples": [ -/// "CSAFGID-0001", -/// "CSAFGID-0002", -/// "CSAFGID-0020" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ProductGroupIdT(::std::string::String); @@ -6133,14 +2657,6 @@ impl ::std::convert::TryFrom<&str> for ProductGroupIdT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ProductGroupIdT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ProductGroupIdT { type Error = self::error::ConversionError; fn try_from( @@ -6162,58 +2678,26 @@ impl<'de> ::serde::Deserialize<'de> for ProductGroupIdT { } } ///Specifies a list of product_group_ids to give context to the parent item. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of product_group_ids", -/// "description": "Specifies a list of product_group_ids to give context to the parent item.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] -pub struct ProductGroupsT(pub Vec); +pub struct ProductGroupsT(pub ::std::vec::Vec); impl ::std::ops::Deref for ProductGroupsT { - type Target = Vec; - fn deref(&self) -> &Vec { + type Target = ::std::vec::Vec; + fn deref(&self) -> &::std::vec::Vec { &self.0 } } -impl ::std::convert::From for Vec { +impl ::std::convert::From for ::std::vec::Vec { fn from(value: ProductGroupsT) -> Self { value.0 } } -impl ::std::convert::From> for ProductGroupsT { - fn from(value: Vec) -> Self { +impl ::std::convert::From<::std::vec::Vec> for ProductGroupsT { + fn from(value: ::std::vec::Vec) -> Self { Self(value) } } ///Token required to identify a full_product_name so that it can be referred to from other parts in the document. There is no predefined or required format for the product_id as long as it uniquely identifies a product in the context of the current document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Reference token for product instance", -/// "description": "Token required to identify a full_product_name so that it can be referred to from other parts in the document. There is no predefined or required format for the product_id as long as it uniquely identifies a product in the context of the current document.", -/// "examples": [ -/// "CSAFPID-0004", -/// "CSAFPID-0008" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ProductIdT(::std::string::String); @@ -6247,14 +2731,6 @@ impl ::std::convert::TryFrom<&str> for ProductIdT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ProductIdT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ProductIdT { type Error = self::error::ConversionError; fn try_from( @@ -6276,220 +2752,42 @@ impl<'de> ::serde::Deserialize<'de> for ProductIdT { } } ///Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct ProductStatus { ///These are the first versions of the releases known to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub first_affected: ::std::option::Option, ///These versions contain the first fix for the vulnerability but may not be the recommended fixed versions. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub first_fixed: ::std::option::Option, ///These versions contain a fix for the vulnerability but may not be the recommended fixed versions. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub fixed: ::std::option::Option, ///These versions are known to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub known_affected: ::std::option::Option, ///These versions are known not to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub known_not_affected: ::std::option::Option, ///These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub last_affected: ::std::option::Option, ///These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub recommended: ::std::option::Option, ///It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub under_investigation: ::std::option::Option, } -impl ::std::default::Default for ProductStatus { - fn default() -> Self { - Self { - first_affected: Default::default(), - first_fixed: Default::default(), - fixed: Default::default(), - known_affected: Default::default(), - known_not_affected: Default::default(), - last_affected: Default::default(), - recommended: Default::default(), - under_investigation: Default::default(), - } - } -} impl ProductStatus { pub fn builder() -> builder::ProductStatus { Default::default() } } ///Is a container for all fully qualified product names that can be referenced elsewhere in the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Product tree", -/// "description": "Is a container for all fully qualified product names that can be referenced elsewhere in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "full_product_names": { -/// "title": "List of full product names", -/// "description": "Contains a list of full product names.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "minItems": 1 -/// }, -/// "product_groups": { -/// "title": "List of product groups", -/// "description": "Contains a list of product groups.", -/// "type": "array", -/// "items": { -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "relationships": { -/// "title": "List of relationships", -/// "description": "Contains a list of relationships.", -/// "type": "array", -/// "items": { -/// "title": "Relationship", -/// "description": "Establishes a link between two existing full_product_name_t elements, allowing the document producer to define a combination of two products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "category", -/// "full_product_name", -/// "product_reference", -/// "relates_to_product_reference" -/// ], -/// "properties": { -/// "category": { -/// "title": "Relationship category", -/// "description": "Defines the category of relationship for the referenced component.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "product_reference": { -/// "title": "Product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the first element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "relates_to_product_reference": { -/// "title": "Relates to product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the second element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct ProductTree { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub branches: ::std::option::Option, ///Contains a list of full product names. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] @@ -6501,133 +2799,41 @@ pub struct ProductTree { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub relationships: ::std::vec::Vec, } -impl ::std::default::Default for ProductTree { - fn default() -> Self { - Self { - branches: Default::default(), - full_product_names: Default::default(), - product_groups: Default::default(), - relationships: Default::default(), - } - } -} impl ProductTree { pub fn builder() -> builder::ProductTree { Default::default() } } ///Specifies a list of product_ids to give context to the parent item. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of product_ids", -/// "description": "Specifies a list of product_ids to give context to the parent item.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] -pub struct ProductsT(pub Vec); +pub struct ProductsT(pub ::std::vec::Vec); impl ::std::ops::Deref for ProductsT { - type Target = Vec; - fn deref(&self) -> &Vec { + type Target = ::std::vec::Vec; + fn deref(&self) -> &::std::vec::Vec { &self.0 } } -impl ::std::convert::From for Vec { +impl ::std::convert::From for ::std::vec::Vec { fn from(value: ProductsT) -> Self { value.0 } } -impl ::std::convert::From> for ProductsT { - fn from(value: Vec) -> Self { +impl ::std::convert::From<::std::vec::Vec> for ProductsT { + fn from(value: ::std::vec::Vec) -> Self { Self(value) } } ///Provides information about the publisher of the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Publisher { ///Provides information about the category of publisher releasing the document. pub category: CategoryOfPublisher, ///Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub contact_details: ::std::option::Option, ///Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub issuing_authority: ::std::option::Option, ///Contains the name of the issuing party. pub name: NameOfPublisher, @@ -6640,44 +2846,6 @@ impl Publisher { } } ///Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Reference", -/// "description": "Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer.", -/// "type": "object", -/// "required": [ -/// "summary", -/// "url" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "url": { -/// "title": "URL of reference", -/// "description": "Provides the URL for the reference.", -/// "type": "string" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Reference { ///Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource. @@ -6694,50 +2862,6 @@ impl Reference { } } ///Holds a list of references. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "List of references", -/// "description": "Holds a list of references.", -/// "type": "array", -/// "items": { -/// "title": "Reference", -/// "description": "Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer.", -/// "type": "object", -/// "required": [ -/// "summary", -/// "url" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "url": { -/// "title": "URL of reference", -/// "description": "Provides the URL for the reference.", -/// "type": "string" -/// } -/// } -/// }, -/// "minItems": 1 -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct ReferencesT(pub ::std::vec::Vec); @@ -6758,50 +2882,6 @@ impl ::std::convert::From<::std::vec::Vec> for ReferencesT { } } ///Establishes a link between two existing full_product_name_t elements, allowing the document producer to define a combination of two products that form a new full_product_name entry. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Relationship", -/// "description": "Establishes a link between two existing full_product_name_t elements, allowing the document producer to define a combination of two products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "category", -/// "full_product_name", -/// "product_reference", -/// "relates_to_product_reference" -/// ], -/// "properties": { -/// "category": { -/// "title": "Relationship category", -/// "description": "Defines the category of relationship for the referenced component.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "product_reference": { -/// "title": "Product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the first element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "relates_to_product_reference": { -/// "title": "Relates to product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the second element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Relationship { ///Defines the category of relationship for the referenced component. @@ -6818,24 +2898,6 @@ impl Relationship { } } ///Defines the category of relationship for the referenced component. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Relationship category", -/// "description": "Defines the category of relationship for the referenced component.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -///} -/// ``` -///
#[derive( ::serde::Deserialize, ::serde::Serialize, @@ -6894,14 +2956,6 @@ impl ::std::convert::TryFrom<&str> for RelationshipCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for RelationshipCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for RelationshipCategory { type Error = self::error::ConversionError; fn try_from( @@ -6911,121 +2965,26 @@ impl ::std::convert::TryFrom<::std::string::String> for RelationshipCategory { } } ///Specifies details on how to handle (and presumably, fix) a vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on category of restart is required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Remediation { ///Specifies the category which this remediation belongs to. pub category: CategoryOfTheRemediation, ///Contains the date from which the remediation is available. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, ///Contains a thorough human-readable discussion of the remediation. pub details: DetailsOfTheRemediation, ///Contains a list of entitlements. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub entitlements: ::std::vec::Vec, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub restart_required: ::std::option::Option, ///Contains the URL where to obtain the remediation. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub url: ::std::option::Option<::std::string::String>, } impl Remediation { @@ -7034,50 +2993,12 @@ impl Remediation { } } ///Provides information on category of restart is required by this remediation to become effective. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Restart required by remediation", -/// "description": "Provides information on category of restart is required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct RestartRequiredByRemediation { ///Specifies what category of restart is required by this remediation to become effective. pub category: CategoryOfRestart, ///Provides additional information for the restart. This can include details on procedures, scope or impact. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub details: ::std::option::Option, } impl RestartRequiredByRemediation { @@ -7086,53 +3007,12 @@ impl RestartRequiredByRemediation { } } ///Contains all the information elements required to track the evolution of a CSAF document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Revision { ///The date of the revision entry pub date: ::std::string::String, ///Contains the version string used in an existing document with the same content. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub legacy_version: ::std::option::Option, pub number: VersionT, ///Holds a single non-empty string representing a short description of the changes. @@ -7144,110 +3024,20 @@ impl Revision { } } ///Describe any constraints on how this document might be shared. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Rules for sharing document", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "GREEN", -/// "RED", -/// "WHITE" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// } -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct RulesForSharingDocument { ///Provides a textual description of additional constraints. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub text: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub tlp: ::std::option::Option, } -impl ::std::default::Default for RulesForSharingDocument { - fn default() -> Self { - Self { - text: Default::default(), - tlp: Default::default(), - } - } -} impl RulesForSharingDocument { pub fn builder() -> builder::RulesForSharingDocument { Default::default() } } ///Specifies information about (at least one) score of the vulnerability and for which products the given value applies. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Score", -/// "description": "Specifies information about (at least one) score of the vulnerability and for which products the given value applies.", -/// "type": "object", -/// "minProperties": 2, -/// "required": [ -/// "products" -/// ], -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Score { #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] @@ -7262,18 +3052,6 @@ impl Score { } } ///Contains a full or abbreviated (partial) serial number of the component to identify. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Serial number", -/// "description": "Contains a full or abbreviated (partial) serial number of the component to identify.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SerialNumber(::std::string::String); @@ -7307,14 +3085,6 @@ impl ::std::convert::TryFrom<&str> for SerialNumber { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SerialNumber { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SerialNumber { type Error = self::error::ConversionError; fn try_from( @@ -7336,18 +3106,6 @@ impl<'de> ::serde::Deserialize<'de> for SerialNumber { } } ///Contains a full or abbreviated (partial) stock keeping unit (SKU) which is used in the ordering process to identify the component. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Stock keeping unit", -/// "description": "Contains a full or abbreviated (partial) stock keeping unit (SKU) which is used in the ordering process to identify the component.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct StockKeepingUnit(::std::string::String); @@ -7381,14 +3139,6 @@ impl ::std::convert::TryFrom<&str> for StockKeepingUnit { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for StockKeepingUnit { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for StockKeepingUnit { type Error = self::error::ConversionError; fn try_from( @@ -7410,21 +3160,6 @@ impl<'de> ::serde::Deserialize<'de> for StockKeepingUnit { } } ///SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheAcknowledgment(::std::string::String); @@ -7458,14 +3193,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheAcknowledgment { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheAcknowledgment { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheAcknowledgment { type Error = self::error::ConversionError; fn try_from( @@ -7487,18 +3214,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheAcknowledgment { } } ///Contains additional context regarding what is going on. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheInvolvement(::std::string::String); @@ -7532,14 +3247,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheInvolvement { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheInvolvement { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheInvolvement { type Error = self::error::ConversionError; fn try_from( @@ -7561,22 +3268,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheInvolvement { } } ///Gives a short, optional description of the group. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheProductGroup(::std::string::String); @@ -7610,14 +3301,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheProductGroup { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheProductGroup { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheProductGroup { type Error = self::error::ConversionError; fn try_from( @@ -7639,18 +3322,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheProductGroup { } } ///Indicates what this reference refers to. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheReference(::std::string::String); @@ -7684,14 +3355,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheReference { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheReference { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheReference { type Error = self::error::ConversionError; fn try_from( @@ -7713,21 +3376,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheReference { } } ///Holds a single non-empty string representing a short description of the changes. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheRevision(::std::string::String); @@ -7761,14 +3409,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheRevision { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheRevision { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheRevision { type Error = self::error::ConversionError; fn try_from( @@ -7790,22 +3430,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheRevision { } } ///Indicates the name of the vulnerability tracking or numbering system. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SystemName(::std::string::String); @@ -7839,14 +3463,6 @@ impl ::std::convert::TryFrom<&str> for SystemName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SystemName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SystemName { type Error = self::error::ConversionError; fn try_from( @@ -7868,22 +3484,6 @@ impl<'de> ::serde::Deserialize<'de> for SystemName { } } ///Is unique label or tracking ID for the vulnerability (if such information exists). -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Text(::std::string::String); @@ -7917,14 +3517,6 @@ impl ::std::convert::TryFrom<&str> for Text { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Text { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Text { type Error = self::error::ConversionError; fn try_from( @@ -7946,23 +3538,6 @@ impl<'de> ::serde::Deserialize<'de> for Text { } } ///Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS). -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextOfAggregateSeverity(::std::string::String); @@ -7996,14 +3571,6 @@ impl ::std::convert::TryFrom<&str> for TextOfAggregateSeverity { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextOfAggregateSeverity { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextOfAggregateSeverity { type Error = self::error::ConversionError; fn try_from( @@ -8025,23 +3592,6 @@ impl<'de> ::serde::Deserialize<'de> for TextOfAggregateSeverity { } } ///Provides a textual description of additional constraints. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextualDescription(::std::string::String); @@ -8075,14 +3625,6 @@ impl ::std::convert::TryFrom<&str> for TextualDescription { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextualDescription { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextualDescription { type Error = self::error::ConversionError; fn try_from( @@ -8104,22 +3646,6 @@ impl<'de> ::serde::Deserialize<'de> for TextualDescription { } } ///The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Textual description of the product", -/// "description": "The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.", -/// "examples": [ -/// "Cisco AnyConnect Secure Mobility Client 2.3.185", -/// "Microsoft Host Integration Server 2006 Service Pack 1" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextualDescriptionOfTheProduct(::std::string::String); @@ -8153,14 +3679,6 @@ impl ::std::convert::TryFrom<&str> for TextualDescriptionOfTheProduct { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextualDescriptionOfTheProduct { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextualDescriptionOfTheProduct { type Error = self::error::ConversionError; fn try_from( @@ -8182,62 +3700,18 @@ impl<'de> ::serde::Deserialize<'de> for TextualDescriptionOfTheProduct { } } ///Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Threat { ///Categorizes the threat according to the rules of the specification. pub category: CategoryOfTheThreat, ///Contains the date when the assessment was done or the threat appeared. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, ///Represents a thorough human-readable discussion of the threat. pub details: DetailsOfTheThreat, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option, } impl Threat { @@ -8246,18 +3720,6 @@ impl Threat { } } ///Gives the document producer the ability to apply a canonical name or title to the vulnerability. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Title(::std::string::String); @@ -8291,14 +3753,6 @@ impl ::std::convert::TryFrom<&str> for Title { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Title { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Title { type Error = self::error::ConversionError; fn try_from( @@ -8320,24 +3774,6 @@ impl<'de> ::serde::Deserialize<'de> for Title { } } ///Provides a concise description of what is contained in the text of the note. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TitleOfNote(::std::string::String); @@ -8371,14 +3807,6 @@ impl ::std::convert::TryFrom<&str> for TitleOfNote { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TitleOfNote { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TitleOfNote { type Error = self::error::ConversionError; fn try_from( @@ -8400,22 +3828,6 @@ impl<'de> ::serde::Deserialize<'de> for TitleOfNote { } } ///This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TitleOfThisDocument(::std::string::String); @@ -8449,14 +3861,6 @@ impl ::std::convert::TryFrom<&str> for TitleOfThisDocument { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TitleOfThisDocument { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TitleOfThisDocument { type Error = self::error::ConversionError; fn try_from( @@ -8478,174 +3882,14 @@ impl<'de> ::serde::Deserialize<'de> for TitleOfThisDocument { } } ///Is a container designated to hold all management attributes necessary to track a CSAF document as a whole. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// } -/// } -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first published.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct Tracking { ///Contains a list of alternate names for the same document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub aliases: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub aliases: ::std::option::Option<::std::vec::Vec>, ///The date when the current revision of this document was released pub current_release_date: ::std::string::String, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub generator: ::std::option::Option, ///The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority. pub id: UniqueIdentifierForTheDocument, @@ -8663,43 +3907,6 @@ impl Tracking { } } ///Provides details about the TLP classification of the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "GREEN", -/// "RED", -/// "WHITE" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// } -///} -/// ``` -///
#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] pub struct TrafficLightProtocolTlp { ///Provides the TLP label of the document. @@ -8714,24 +3921,6 @@ impl TrafficLightProtocolTlp { } } ///The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct UniqueIdentifierForTheDocument(::std::string::String); @@ -8770,14 +3959,6 @@ impl ::std::convert::TryFrom<&str> for UniqueIdentifierForTheDocument { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for UniqueIdentifierForTheDocument { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for UniqueIdentifierForTheDocument { type Error = self::error::ConversionError; fn try_from( @@ -8799,24 +3980,6 @@ impl<'de> ::serde::Deserialize<'de> for UniqueIdentifierForTheDocument { } } ///Contains the cryptographic hash value in hexadecimal representation. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-fA-F]{32,}$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ValueOfTheCryptographicHash(::std::string::String); @@ -8855,14 +4018,6 @@ impl ::std::convert::TryFrom<&str> for ValueOfTheCryptographicHash { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ValueOfTheCryptographicHash { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ValueOfTheCryptographicHash { type Error = self::error::ConversionError; fn try_from( @@ -8884,25 +4039,6 @@ impl<'de> ::serde::Deserialize<'de> for ValueOfTheCryptographicHash { } } ///Specifies a version string to denote clearly the evolution of the content of the document. Format must be either integer or semantic versioning. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Version", -/// "description": "Specifies a version string to denote clearly the evolution of the content of the document. Format must be either integer or semantic versioning.", -/// "examples": [ -/// "1", -/// "4", -/// "0.9.0", -/// "1.4.3", -/// "2.40.0+21AF26D3" -/// ], -/// "type": "string", -/// "pattern": "^(0|[1-9][0-9]*)$|^((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$" -///} -/// ``` -///
#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct VersionT(::std::string::String); @@ -8946,14 +4082,6 @@ impl ::std::convert::TryFrom<&str> for VersionT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for VersionT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for VersionT { type Error = self::error::ConversionError; fn try_from( @@ -8975,467 +4103,38 @@ impl<'de> ::serde::Deserialize<'de> for VersionT { } } ///Is a container for the aggregation of all fields that are related to a single vulnerability in the document. -/// -///
JSON schema -/// -/// ```json -///{ -/// "title": "Vulnerability", -/// "description": "Is a container for the aggregation of all fields that are related to a single vulnerability in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "acknowledgments": { -/// "title": "Vulnerability acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with this vulnerability item.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "cve": { -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -/// }, -/// "cwe": { -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "discovery_date": { -/// "title": "Discovery date", -/// "description": "Holds the date and time the vulnerability was originally discovered.", -/// "type": "string" -/// }, -/// "flags": { -/// "title": "List of flags", -/// "description": "Contains a list of machine readable flags.", -/// "type": "array", -/// "items": { -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "ids": { -/// "title": "List of IDs", -/// "description": "Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists).", -/// "type": "array", -/// "items": { -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "involvements": { -/// "title": "List of involvements", -/// "description": "Contains a list of involvements.", -/// "type": "array", -/// "items": { -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "notes": { -/// "title": "Vulnerability notes", -/// "description": "Holds notes associated with this vulnerability item.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "product_status": { -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "references": { -/// "title": "Vulnerability references", -/// "description": "Holds a list of references associated with this vulnerability item.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "release_date": { -/// "title": "Release date", -/// "description": "Holds the date and time the vulnerability was originally released into the wild.", -/// "type": "string" -/// }, -/// "remediations": { -/// "title": "List of remediations", -/// "description": "Contains a list of remediations.", -/// "type": "array", -/// "items": { -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on category of restart is required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "scores": { -/// "title": "List of scores", -/// "description": "Contains score objects for the current vulnerability.", -/// "type": "array", -/// "items": { -/// "title": "Score", -/// "description": "Specifies information about (at least one) score of the vulnerability and for which products the given value applies.", -/// "type": "object", -/// "minProperties": 2, -/// "required": [ -/// "products" -/// ], -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "threats": { -/// "title": "List of threats", -/// "description": "Contains information about a vulnerability that can change with time.", -/// "type": "array", -/// "items": { -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// } -/// }, -/// "minItems": 1 -/// }, -/// "title": { -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// } -/// } -///} -/// ``` -///
-#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] pub struct Vulnerability { ///Contains a list of acknowledgment elements associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub acknowledgments: ::std::option::Option, ///Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub cve: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub cwe: ::std::option::Option, ///Holds the date and time the vulnerability was originally discovered. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub discovery_date: ::std::option::Option<::std::string::String>, ///Contains a list of machine readable flags. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub flags: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub flags: ::std::option::Option<::std::vec::Vec>, ///Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists). - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub ids: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub ids: ::std::option::Option<::std::vec::Vec>, ///Contains a list of involvements. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub involvements: ::std::option::Option>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub involvements: ::std::option::Option<::std::vec::Vec>, ///Holds notes associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub notes: ::std::option::Option, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_status: ::std::option::Option, ///Holds a list of references associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub references: ::std::option::Option, ///Holds the date and time the vulnerability was originally released into the wild. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub release_date: ::std::option::Option<::std::string::String>, ///Contains a list of remediations. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] @@ -9447,53 +4146,15 @@ pub struct Vulnerability { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub threats: ::std::vec::Vec, ///Gives the document producer the ability to apply a canonical name or title to the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub title: ::std::option::Option, } -impl ::std::default::Default for Vulnerability { - fn default() -> Self { - Self { - acknowledgments: Default::default(), - cve: Default::default(), - cwe: Default::default(), - discovery_date: Default::default(), - flags: Default::default(), - ids: Default::default(), - involvements: Default::default(), - notes: Default::default(), - product_status: Default::default(), - references: Default::default(), - release_date: Default::default(), - remediations: Default::default(), - scores: Default::default(), - threats: Default::default(), - title: Default::default(), - } - } -} impl Vulnerability { pub fn builder() -> builder::Vulnerability { Default::default() } } ///Holds the ID for the weakness associated. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct WeaknessId(::std::string::String); @@ -9529,14 +4190,6 @@ impl ::std::convert::TryFrom<&str> for WeaknessId { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for WeaknessId { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for WeaknessId { type Error = self::error::ConversionError; fn try_from( @@ -9558,23 +4211,6 @@ impl<'de> ::serde::Deserialize<'de> for WeaknessId { } } ///Holds the full name of the weakness as given in the CWE specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct WeaknessName(::std::string::String); @@ -9608,14 +4244,6 @@ impl ::std::convert::TryFrom<&str> for WeaknessName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for WeaknessName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for WeaknessName { type Error = self::error::ConversionError; fn try_from( @@ -10764,7 +5392,7 @@ pub mod builder { ::std::string::String, >, model_numbers: ::std::result::Result< - ::std::option::Option<Vec<super::ModelNumber>>, + ::std::option::Option<::std::vec::Vec<super::ModelNumber>>, ::std::string::String, >, purl: ::std::result::Result< @@ -10776,7 +5404,7 @@ pub mod builder { ::std::string::String, >, serial_numbers: ::std::result::Result< - ::std::option::Option<Vec<super::SerialNumber>>, + ::std::option::Option<::std::vec::Vec<super::SerialNumber>>, ::std::string::String, >, skus: ::std::result::Result< @@ -10827,7 +5455,9 @@ pub mod builder { } pub fn model_numbers<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::ModelNumber>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::ModelNumber>>, + >, T::Error: ::std::fmt::Display, { self.model_numbers = value @@ -10863,7 +5493,9 @@ pub mod builder { } pub fn serial_numbers<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::SerialNumber>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::SerialNumber>>, + >, T::Error: ::std::fmt::Display, { self.serial_numbers = value @@ -11173,7 +5805,7 @@ pub mod builder { pub struct ProductGroup { group_id: ::std::result::Result<super::ProductGroupIdT, ::std::string::String>, product_ids: ::std::result::Result< - Vec<super::ProductIdT>, + ::std::vec::Vec<super::ProductIdT>, ::std::string::String, >, summary: ::std::result::Result< @@ -11205,7 +5837,7 @@ pub mod builder { } pub fn product_ids<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::ProductIdT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::ProductIdT>>, T::Error: ::std::fmt::Display, { self.product_ids = value @@ -12440,7 +7072,7 @@ pub mod builder { #[derive(Clone, Debug)] pub struct Tracking { aliases: ::std::result::Result< - ::std::option::Option<Vec<super::AlternateName>>, + ::std::option::Option<::std::vec::Vec<super::AlternateName>>, ::std::string::String, >, current_release_date: ::std::result::Result< @@ -12489,7 +7121,9 @@ pub mod builder { impl Tracking { pub fn aliases<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::AlternateName>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::AlternateName>>, + >, T::Error: ::std::fmt::Display, { self.aliases = value @@ -12690,15 +7324,15 @@ pub mod builder { ::std::string::String, >, flags: ::std::result::Result< - ::std::option::Option<Vec<super::Flag>>, + ::std::option::Option<::std::vec::Vec<super::Flag>>, ::std::string::String, >, ids: ::std::result::Result< - ::std::option::Option<Vec<super::Id>>, + ::std::option::Option<::std::vec::Vec<super::Id>>, ::std::string::String, >, involvements: ::std::result::Result< - ::std::option::Option<Vec<super::Involvement>>, + ::std::option::Option<::std::vec::Vec<super::Involvement>>, ::std::string::String, >, notes: ::std::result::Result< @@ -12802,7 +7436,9 @@ pub mod builder { } pub fn flags<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Flag>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Flag>>, + >, T::Error: ::std::fmt::Display, { self.flags = value @@ -12812,7 +7448,9 @@ pub mod builder { } pub fn ids<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Id>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Id>>, + >, T::Error: ::std::fmt::Display, { self.ids = value @@ -12822,7 +7460,9 @@ pub mod builder { } pub fn involvements<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Involvement>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Involvement>>, + >, T::Error: ::std::fmt::Display, { self.involvements = value @@ -12978,6 +7618,38 @@ pub mod defaults { "https://www.first.org/tlp/".to_string() } } +/// Error types. +pub mod error { + /// Error from a `TryFrom` or `FromStr` implementation. + pub struct ConversionError(::std::borrow::Cow<'static, str>); + impl ::std::error::Error for ConversionError {} + impl ::std::fmt::Display for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Display::fmt(&self.0, f) + } + } + impl ::std::fmt::Debug for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Debug::fmt(&self.0, f) + } + } + impl From<&'static str> for ConversionError { + fn from(value: &'static str) -> Self { + Self(value.into()) + } + } + impl From<String> for ConversionError { + fn from(value: String) -> Self { + Self(value.into()) + } + } +} crate::macros::impl_string_newtype_ergonomics!(AdditionalRestartInformation); crate::macros::impl_string_newtype_ergonomics!(AlgorithmOfTheCryptographicHash); crate::macros::impl_string_newtype_ergonomics!(AlternateName); diff --git a/csaf-rs/src/schema/csaf2_0/testcases_schema.rs b/csaf-rs/src/schema/csaf2_0/testcases_schema.rs index 4f167f3d..d7ca3acb 100644 --- a/csaf-rs/src/schema/csaf2_0/testcases_schema.rs +++ b/csaf-rs/src/schema/csaf2_0/testcases_schema.rs @@ -6,68 +6,7 @@ #![allow(clippy::all)] #![cfg_attr(any(), rustfmt::skip)] #![allow(rustdoc::all)] -/// Error types. -pub mod error { - /// Error from a `TryFrom` or `FromStr` implementation. - pub struct ConversionError(::std::borrow::Cow<'static, str>); - impl ::std::error::Error for ConversionError {} - impl ::std::fmt::Display for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Display::fmt(&self.0, f) - } - } - impl ::std::fmt::Debug for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Debug::fmt(&self.0, f) - } - } - impl From<&'static str> for ConversionError { - fn from(value: &'static str) -> Self { - Self(value.into()) - } - } - impl From<String> for ConversionError { - fn from(value: String) -> Self { - Self(value.into()) - } - } -} ///Contains information about a single test file. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "File information", -/// "description": "Contains information about a single test file.", -/// "type": "object", -/// "required": [ -/// "name", -/// "valid" -/// ], -/// "properties": { -/// "name": { -/// "title": "Name of the test file", -/// "description": "Contains the filename and path relative to the JSON that includes this object.", -/// "type": "string", -/// "pattern": "^.+\\.json$" -/// }, -/// "valid": { -/// "title": "Evaluation result", -/// "description": "States whether the test file is valid according to the CSAF standard.", -/// "type": "boolean" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct FileT { @@ -82,21 +21,6 @@ impl FileT { } } ///Contains the URL of the JSON schema for test data which the document promises to be valid for. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "JSON schema", -/// "description": "Contains the URL of the JSON schema for test data which the document promises to be valid for.", -/// "type": "string", -/// "format": "uri", -/// "enum": [ -/// "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/test/validator/testcases_json_schema.json" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -149,14 +73,6 @@ impl ::std::convert::TryFrom<&str> for JsonSchema { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for JsonSchema { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { type Error = self::error::ConversionError; fn try_from( @@ -166,18 +82,6 @@ impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { } } ///Contains the filename and path relative to the JSON that includes this object. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of the test file", -/// "description": "Contains the filename and path relative to the JSON that includes this object.", -/// "type": "string", -/// "pattern": "^.+\\.json$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheTestFile(::std::string::String); @@ -213,14 +117,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheTestFile { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheTestFile { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheTestFile { type Error = self::error::ConversionError; fn try_from( @@ -242,18 +138,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheTestFile { } } ///Contains the section number of the test in the specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Number of the test", -/// "description": "Contains the section number of the test in the specification.", -/// "type": "string", -/// "pattern": "^6\\.(([1-3]\\.[1-9])|([12]\\.1[0-9])|(3\\.1[01])|([12]\\.20)|(1\\.2[1-68-9])|(1\\.27\\.([1-9]|10|11))|(1\\.3[0-3]))$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NumberOfTheTest(::std::string::String); @@ -297,14 +181,6 @@ impl ::std::convert::TryFrom<&str> for NumberOfTheTest { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NumberOfTheTest { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NumberOfTheTest { type Error = self::error::ConversionError; fn try_from( @@ -326,53 +202,6 @@ impl<'de> ::serde::Deserialize<'de> for NumberOfTheTest { } } ///Representation of the data provided for test cases from section 6 of the specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "$id": "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/test/validator/testcases_json_schema.json", -/// "title": "Test cases for CSAF", -/// "description": "Representation of the data provided for test cases from section 6 of the specification.", -/// "type": "object", -/// "required": [ -/// "$schema", -/// "tests", -/// "testschema_version" -/// ], -/// "properties": { -/// "$schema": { -/// "title": "JSON schema", -/// "description": "Contains the URL of the JSON schema for test data which the document promises to be valid for.", -/// "type": "string", -/// "format": "uri", -/// "enum": [ -/// "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.0/test/validator/testcases_json_schema.json" -/// ] -/// }, -/// "tests": { -/// "title": "List of tests", -/// "description": "Contains a list of test data.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/test_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "testschema_version": { -/// "title": "Test schema version", -/// "description": "Contains the current version of this schema", -/// "type": "string", -/// "enum": [ -/// "2.0" -/// ] -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct TestCasesForCsaf { @@ -380,7 +209,7 @@ pub struct TestCasesForCsaf { #[serde(rename = "$schema")] pub schema: JsonSchema, ///Contains a list of test data. - pub tests: Vec<TestT>, + pub tests: ::std::vec::Vec<TestT>, ///Contains the current version of this schema pub testschema_version: TestSchemaVersion, } @@ -390,22 +219,6 @@ impl TestCasesForCsaf { } } ///Contains the name of the group the test belongs to. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test group", -/// "description": "Contains the name of the group the test belongs to.", -/// "type": "string", -/// "enum": [ -/// "mandatory", -/// "informative", -/// "optional" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -456,14 +269,6 @@ impl ::std::convert::TryFrom<&str> for TestGroup { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TestGroup { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TestGroup { type Error = self::error::ConversionError; fn try_from( @@ -473,20 +278,6 @@ impl ::std::convert::TryFrom<::std::string::String> for TestGroup { } } ///Contains the current version of this schema -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test schema version", -/// "description": "Contains the current version of this schema", -/// "type": "string", -/// "enum": [ -/// "2.0" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -529,14 +320,6 @@ impl ::std::convert::TryFrom<&str> for TestSchemaVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TestSchemaVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TestSchemaVersion { type Error = self::error::ConversionError; fn try_from( @@ -546,73 +329,18 @@ impl ::std::convert::TryFrom<::std::string::String> for TestSchemaVersion { } } ///Contains test data for a single test. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test", -/// "description": "Contains test data for a single test.", -/// "type": "object", -/// "required": [ -/// "failures", -/// "group", -/// "id" -/// ], -/// "properties": { -/// "failures": { -/// "title": "List of failing examples", -/// "description": "Contains a list of files of examples that fail that specific test.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/file_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "group": { -/// "title": "Test group", -/// "description": "Contains the name of the group the test belongs to.", -/// "type": "string", -/// "enum": [ -/// "mandatory", -/// "informative", -/// "optional" -/// ] -/// }, -/// "id": { -/// "title": "Number of the test", -/// "description": "Contains the section number of the test in the specification.", -/// "type": "string", -/// "pattern": "^6\\.(([1-3]\\.[1-9])|([12]\\.1[0-9])|(3\\.1[01])|([12]\\.20)|(1\\.2[1-68-9])|(1\\.27\\.([1-9]|10|11))|(1\\.3[0-3]))$" -/// }, -/// "valid": { -/// "title": "List of valid examples", -/// "description": "Contains a list of files of examples that pass that specific test.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/file_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct TestT { ///Contains a list of files of examples that fail that specific test. - pub failures: Vec<FileT>, + pub failures: ::std::vec::Vec<FileT>, ///Contains the name of the group the test belongs to. pub group: TestGroup, ///Contains the section number of the test in the specification. pub id: NumberOfTheTest, ///Contains a list of files of examples that pass that specific test. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub valid: ::std::option::Option<Vec<FileT>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub valid: ::std::option::Option<::std::vec::Vec<FileT>>, } impl TestT { pub fn builder() -> builder::TestT { @@ -678,7 +406,10 @@ pub mod builder { #[derive(Clone, Debug)] pub struct TestCasesForCsaf { schema: ::std::result::Result<super::JsonSchema, ::std::string::String>, - tests: ::std::result::Result<Vec<super::TestT>, ::std::string::String>, + tests: ::std::result::Result< + ::std::vec::Vec<super::TestT>, + ::std::string::String, + >, testschema_version: ::std::result::Result< super::TestSchemaVersion, ::std::string::String, @@ -708,7 +439,7 @@ pub mod builder { } pub fn tests<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::TestT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::TestT>>, T::Error: ::std::fmt::Display, { self.tests = value @@ -754,11 +485,14 @@ pub mod builder { } #[derive(Clone, Debug)] pub struct TestT { - failures: ::std::result::Result<Vec<super::FileT>, ::std::string::String>, + failures: ::std::result::Result< + ::std::vec::Vec<super::FileT>, + ::std::string::String, + >, group: ::std::result::Result<super::TestGroup, ::std::string::String>, id: ::std::result::Result<super::NumberOfTheTest, ::std::string::String>, valid: ::std::result::Result< - ::std::option::Option<Vec<super::FileT>>, + ::std::option::Option<::std::vec::Vec<super::FileT>>, ::std::string::String, >, } @@ -775,7 +509,7 @@ pub mod builder { impl TestT { pub fn failures<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::FileT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::FileT>>, T::Error: ::std::fmt::Display, { self.failures = value @@ -807,7 +541,9 @@ pub mod builder { } pub fn valid<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::FileT>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::FileT>>, + >, T::Error: ::std::fmt::Display, { self.valid = value @@ -840,5 +576,37 @@ pub mod builder { } } } +/// Error types. +pub mod error { + /// Error from a `TryFrom` or `FromStr` implementation. + pub struct ConversionError(::std::borrow::Cow<'static, str>); + impl ::std::error::Error for ConversionError {} + impl ::std::fmt::Display for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Display::fmt(&self.0, f) + } + } + impl ::std::fmt::Debug for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Debug::fmt(&self.0, f) + } + } + impl From<&'static str> for ConversionError { + fn from(value: &'static str) -> Self { + Self(value.into()) + } + } + impl From<String> for ConversionError { + fn from(value: String) -> Self { + Self(value.into()) + } + } +} crate::macros::impl_string_newtype_ergonomics!(NameOfTheTestFile); crate::macros::impl_string_newtype_ergonomics!(NumberOfTheTest); diff --git a/csaf-rs/src/schema/csaf2_1/schema.rs b/csaf-rs/src/schema/csaf2_1/schema.rs index 0650d479..6dc7d830 100644 --- a/csaf-rs/src/schema/csaf2_1/schema.rs +++ b/csaf-rs/src/schema/csaf2_1/schema.rs @@ -6,201 +6,29 @@ #![allow(clippy::all)] #![cfg_attr(any(), rustfmt::skip)] #![allow(rustdoc::all)] -/// Error types. -pub mod error { - /// Error from a `TryFrom` or `FromStr` implementation. - pub struct ConversionError(::std::borrow::Cow<'static, str>); - impl ::std::error::Error for ConversionError {} - impl ::std::fmt::Display for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Display::fmt(&self.0, f) - } - } - impl ::std::fmt::Debug for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Debug::fmt(&self.0, f) - } - } - impl From<&'static str> for ConversionError { - fn from(value: &'static str) -> Self { - Self(value.into()) - } - } - impl From<String> for ConversionError { - fn from(value: String) -> Self { - Self(value.into()) - } - } -} ///Acknowledges contributions by describing those that contributed. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Acknowledgment", -/// "description": "Acknowledges contributions by describing those that contributed.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "names": { -/// "title": "List of acknowledged names", -/// "description": "Contains the names of contributors being recognized.", -/// "type": "array", -/// "items": { -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "organization": { -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "summary": { -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "urls": { -/// "title": "List of URLs", -/// "description": "Specifies a list of URLs or location of the reference to be acknowledged.", -/// "type": "array", -/// "items": { -/// "title": "URL of acknowledgment", -/// "description": "Contains the URL or location of the reference to be acknowledged.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Acknowledgment { ///Contains the names of contributors being recognized. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub names: ::std::vec::Vec<NameOfTheContributor>, ///Contains the name of a contributing organization being recognized. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub organization: ::std::option::Option<ContributingOrganization>, ///SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option<SummaryOfTheAcknowledgment>, ///Specifies a list of URLs or location of the reference to be acknowledged. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub urls: ::std::vec::Vec<::std::string::String>, } -impl ::std::default::Default for Acknowledgment { - fn default() -> Self { - Self { - names: Default::default(), - organization: Default::default(), - summary: Default::default(), - urls: Default::default(), - } - } -} impl Acknowledgment { pub fn builder() -> builder::Acknowledgment { Default::default() } } ///Contains a list of acknowledgment elements. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of acknowledgments", -/// "description": "Contains a list of acknowledgment elements.", -/// "type": "array", -/// "items": { -/// "title": "Acknowledgment", -/// "description": "Acknowledges contributions by describing those that contributed.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "names": { -/// "title": "List of acknowledged names", -/// "description": "Contains the names of contributors being recognized.", -/// "type": "array", -/// "items": { -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "organization": { -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "summary": { -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "urls": { -/// "title": "List of URLs", -/// "description": "Specifies a list of URLs or location of the reference to be acknowledged.", -/// "type": "array", -/// "items": { -/// "title": "URL of acknowledgment", -/// "description": "Contains the URL or location of the reference to be acknowledged.", -/// "type": "string" -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct AcknowledgmentsT(pub ::std::vec::Vec<Acknowledgment>); @@ -221,18 +49,6 @@ impl ::std::convert::From<::std::vec::Vec<Acknowledgment>> for AcknowledgmentsT } } ///Provides additional information for the restart. This can include details on procedures, scope or impact. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AdditionalRestartInformation(::std::string::String); @@ -266,14 +82,6 @@ impl ::std::convert::TryFrom<&str> for AdditionalRestartInformation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AdditionalRestartInformation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AdditionalRestartInformation { type Error = self::error::ConversionError; fn try_from( @@ -295,44 +103,11 @@ impl<'de> ::serde::Deserialize<'de> for AdditionalRestartInformation { } } ///Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct AggregateSeverity { ///Points to the namespace so referenced. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub namespace: ::std::option::Option<::std::string::String>, ///Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS). pub text: TextOfAggregateSeverity, @@ -343,27 +118,6 @@ impl AggregateSeverity { } } ///Contains the name of the cryptographic hash algorithm used to calculate the value. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[0-9a-z][0-9a-z-]*$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AlgorithmOfTheCryptographicHash(::std::string::String); @@ -407,15 +161,6 @@ impl ::std::convert::TryFrom<&str> for AlgorithmOfTheCryptographicHash { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> -for AlgorithmOfTheCryptographicHash { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AlgorithmOfTheCryptographicHash { type Error = self::error::ConversionError; fn try_from( @@ -437,21 +182,6 @@ impl<'de> ::serde::Deserialize<'de> for AlgorithmOfTheCryptographicHash { } } ///Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AlternateName(::std::string::String); @@ -485,14 +215,6 @@ impl ::std::convert::TryFrom<&str> for AlternateName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AlternateName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AlternateName { type Error = self::error::ConversionError; fn try_from( @@ -514,24 +236,6 @@ impl<'de> ::serde::Deserialize<'de> for AlternateName { } } ///Indicates who is intended to read it. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct AudienceOfNote(::std::string::String); @@ -565,14 +269,6 @@ impl ::std::convert::TryFrom<&str> for AudienceOfNote { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for AudienceOfNote { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for AudienceOfNote { type Error = self::error::ConversionError; fn try_from( @@ -594,77 +290,16 @@ impl<'de> ::serde::Deserialize<'de> for AudienceOfNote { } } ///Is a part of the hierarchical structure of the product tree. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Branch", -/// "description": "Is a part of the hierarchical structure of the product tree.", -/// "type": "object", -/// "maxProperties": 3, -/// "minProperties": 3, -/// "required": [ -/// "category", -/// "name" -/// ], -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "category": { -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "patch_level", -/// "platform", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -/// }, -/// "name": { -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product": { -/// "$ref": "#/$defs/full_product_name_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Branch { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub branches: ::std::option::Option<BranchesT>, ///Describes the characteristics of the labeled branch. pub category: CategoryOfTheBranch, ///Contains the canonical descriptor or 'friendly name' of the branch. pub name: NameOfTheBranch, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product: ::std::option::Option<FullProductNameT>, } impl Branch { @@ -673,73 +308,6 @@ impl Branch { } } ///Contains branch elements as children of the current element. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of branches", -/// "description": "Contains branch elements as children of the current element.", -/// "type": "array", -/// "items": { -/// "title": "Branch", -/// "description": "Is a part of the hierarchical structure of the product tree.", -/// "type": "object", -/// "maxProperties": 3, -/// "minProperties": 3, -/// "required": [ -/// "category", -/// "name" -/// ], -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "category": { -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "patch_level", -/// "platform", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -/// }, -/// "name": { -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product": { -/// "$ref": "#/$defs/full_product_name_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct BranchesT(pub ::std::vec::Vec<Branch>); @@ -760,26 +328,6 @@ impl ::std::convert::From<::std::vec::Vec<Branch>> for BranchesT { } } ///Provides information about the category of publisher releasing the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "multiplier", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -846,14 +394,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfPublisher { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfPublisher { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfPublisher { type Error = self::error::ConversionError; fn try_from( @@ -863,22 +403,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfPublisher { } } ///Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -925,14 +449,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfReference { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfReference { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfReference { type Error = self::error::ConversionError; fn try_from( @@ -947,28 +463,6 @@ impl ::std::default::Default for CategoryOfReference { } } ///Specifies what category of restart is required by this remediation to become effective. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1043,14 +537,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfRestart { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfRestart { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfRestart { type Error = self::error::ConversionError; fn try_from( @@ -1060,31 +546,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfRestart { } } ///Describes the characteristics of the labeled branch. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of the branch", -/// "description": "Describes the characteristics of the labeled branch.", -/// "type": "string", -/// "enum": [ -/// "architecture", -/// "host_name", -/// "language", -/// "patch_level", -/// "platform", -/// "product_family", -/// "product_name", -/// "product_version", -/// "product_version_range", -/// "service_pack", -/// "specification", -/// "vendor" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1171,14 +632,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheBranch { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheBranch { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheBranch { type Error = self::error::ConversionError; fn try_from( @@ -1188,26 +641,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheBranch { } } ///Specifies the category which this remediation belongs to. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "fix_planned", -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "optional_patch", -/// "vendor_fix", -/// "workaround" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1274,14 +707,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -1291,22 +716,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheRemediation } } ///Categorizes the threat according to the rules of the specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -1357,14 +766,6 @@ impl ::std::convert::TryFrom<&str> for CategoryOfTheThreat { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CategoryOfTheThreat { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheThreat { type Error = self::error::ConversionError; fn try_from( @@ -1374,19 +775,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CategoryOfTheThreat { } } ///The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^((cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6}))$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct CommonPlatformEnumerationRepresentation(::std::string::String); @@ -1434,15 +822,6 @@ impl ::std::convert::TryFrom<&str> for CommonPlatformEnumerationRepresentation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> -for CommonPlatformEnumerationRepresentation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CommonPlatformEnumerationRepresentation { type Error = self::error::ConversionError; @@ -1465,1165 +844,11 @@ impl<'de> ::serde::Deserialize<'de> for CommonPlatformEnumerationRepresentation } } ///Representation of security advisory information as a JSON document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "$id": "https://docs.oasis-open.org/csaf/csaf/v2.1/schema/csaf.json", -/// "title": "Common Security Advisory Framework", -/// "description": "Representation of security advisory information as a JSON document.", -/// "type": "object", -/// "required": [ -/// "$schema", -/// "document" -/// ], -/// "properties": { -/// "$schema": { -/// "title": "JSON schema", -/// "description": "Contains the URL of the CSAF JSON schema which the document promises to be valid for.", -/// "type": "string", -/// "enum": [ -/// "https://docs.oasis-open.org/csaf/csaf/v2.1/schema/csaf.json" -/// ] -/// }, -/// "document": { -/// "title": "Document level meta-data", -/// "description": "Captures the meta-data about this document describing a particular set of security advisories.", -/// "type": "object", -/// "required": [ -/// "category", -/// "csaf_version", -/// "distribution", -/// "publisher", -/// "title", -/// "tracking" -/// ], -/// "properties": { -/// "acknowledgments": { -/// "title": "Document acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with the whole document.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "aggregate_severity": { -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "category": { -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "csaf_version": { -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.1" -/// ] -/// }, -/// "distribution": { -/// "title": "Rules for document sharing", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "required": [ -/// "tlp" -/// ], -/// "properties": { -/// "sharing_group": { -/// "title": "Sharing Group", -/// "description": "Contains information about the group this document is intended to be shared with.", -/// "type": "object", -/// "required": [ -/// "id" -/// ], -/// "properties": { -/// "id": { -/// "title": "Sharing Group ID", -/// "description": "Provides the unique ID for the sharing group.", -/// "type": "string", -/// "format": "uuid", -/// "pattern": "^(([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})|([0]{8}-([0]{4}-){3}[0]{12})|([f]{8}-([f]{4}-){3}[f]{12}))$" -/// }, -/// "name": { -/// "title": "Sharing Group Name", -/// "description": "Contains a human-readable name for the sharing group.", -/// "examples": [ -/// "Customer A", -/// "ISAC members", -/// "NIS2 regulated important entities in Germany, sector water", -/// "Pre-Sharing group for advisory discussion", -/// "Users of Product A", -/// "US Federal Civilian Authorities" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "default": "CLEAR", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "AMBER+STRICT", -/// "CLEAR", -/// "GREEN", -/// "RED" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "lang": { -/// "title": "Document language", -/// "description": "Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "license_expression": { -/// "title": "License expression", -/// "description": "Contains the SPDX license expression for the CSAF document.", -/// "examples": [ -/// "CC-BY-4.0", -/// "LicenseRef-www.example.org-Example-CSAF-License-3.0+", -/// "LicenseRef-scancode-public-domain", -/// "MIT OR any-OSI" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "notes": { -/// "title": "Document notes", -/// "description": "Holds notes associated with the whole document.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "publisher": { -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "multiplier", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "references": { -/// "title": "Document references", -/// "description": "Holds a list of references associated with the whole document.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "source_lang": { -/// "title": "Source language", -/// "description": "If this copy of the document is a translation then the value of this property describes from which language this document was translated.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "title": { -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tracking": { -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first released to the specified target group.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "x_extensions": { -/// "title": "Document-level Extensions", -/// "description": "Contains a list of extensions valid at the document property level of the CSAF document and associated with this document metadata.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "product_tree": { -/// "title": "Product tree", -/// "description": "Is a container for all fully qualified product names that can be referenced elsewhere in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "full_product_names": { -/// "title": "List of full product names", -/// "description": "Contains a list of full product names.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "minItems": 1 -/// }, -/// "product_groups": { -/// "title": "List of product groups", -/// "description": "Contains a list of product groups.", -/// "type": "array", -/// "items": { -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "product_paths": { -/// "title": "List of product paths", -/// "description": "Contains a list of product paths.", -/// "type": "array", -/// "items": { -/// "title": "Product path", -/// "description": "Establishes a path along existing full_product_name_t elements, allowing the document producer to define a path of multiple products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "beginning_product_reference", -/// "full_product_name", -/// "subpaths" -/// ], -/// "properties": { -/// "beginning_product_reference": { -/// "title": "Beginning product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is the beginning node of the product path.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "subpaths": { -/// "title": "List of product subpaths", -/// "description": "Contains an ordered list of product subpaths, each one relating to the path defined by all previous elements up to the beginning node of the product path.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/subpath_t" -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "vulnerabilities": { -/// "title": "Vulnerabilities", -/// "description": "Represents a list of all relevant vulnerability information items.", -/// "type": "array", -/// "items": { -/// "title": "Vulnerability", -/// "description": "Is a container for the aggregation of all fields that are related to a single vulnerability in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "acknowledgments": { -/// "title": "Vulnerability acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with this vulnerability item.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "cve": { -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -/// }, -/// "cwes": { -/// "title": "List of CWEs", -/// "description": "Contains a list of CWEs.", -/// "type": "array", -/// "items": { -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name", -/// "version" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "version": { -/// "title": "CWE version", -/// "description": "Holds the version string of the CWE specification this weakness was extracted from.", -/// "examples": [ -/// "1.0", -/// "3.4.1", -/// "4.0", -/// "4.11", -/// "4.12" -/// ], -/// "type": "string", -/// "pattern": "^[1-9]\\d*\\.([0-9]|([1-9]\\d+))(\\.\\d+)?$" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "disclosure_date": { -/// "title": "Disclosure date", -/// "description": "Holds the date and time the vulnerability was originally disclosed to the public.", -/// "type": "string" -/// }, -/// "discovery_date": { -/// "title": "Discovery date", -/// "description": "Holds the date and time the vulnerability was originally discovered.", -/// "type": "string" -/// }, -/// "first_known_exploitation_dates": { -/// "title": "List of first known exploitation dates", -/// "description": "Contains a list of dates of first known exploitations.", -/// "type": "array", -/// "items": { -/// "title": "First known exploitation date", -/// "description": "Contains information on when this vulnerability was first known to be exploited in the wild in the products specified.", -/// "type": "object", -/// "minProperties": 3, -/// "required": [ -/// "date", -/// "exploitation_date" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the information", -/// "description": "Contains the date when the information was last updated.", -/// "type": "string" -/// }, -/// "exploitation_date": { -/// "title": "Date of the exploitation", -/// "description": "Contains the date when the exploitation happened.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "flags": { -/// "title": "List of flags", -/// "description": "Contains a list of machine readable flags.", -/// "type": "array", -/// "items": { -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "ids": { -/// "title": "List of IDs", -/// "description": "Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists).", -/// "type": "array", -/// "items": { -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue", -/// "https://github.com/oasis-tcs/csaf" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210", -/// "#1217" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "involvements": { -/// "title": "List of involvements", -/// "description": "Contains a list of involvements.", -/// "type": "array", -/// "items": { -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "contact": { -/// "title": "Party contact information", -/// "description": "Contains the contact information of the party that was used in this state.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "metrics": { -/// "title": "List of metrics", -/// "description": "Contains metric objects for the current vulnerability.", -/// "type": "array", -/// "items": { -/// "title": "metric", -/// "description": "Contains all metadata about the metric including products it applies to and the source and the content itself.", -/// "type": "object", -/// "required": [ -/// "content", -/// "products" -/// ], -/// "properties": { -/// "content": { -/// "title": "Content", -/// "description": "Specifies information about (at least one) metric or score for the given products regarding the current vulnerability.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "cvss_v4": { -/// "type": "object" -/// }, -/// "epss": { -/// "title": "EPSS", -/// "description": "Contains the EPSS data.", -/// "type": "object", -/// "required": [ -/// "percentile", -/// "probability", -/// "timestamp" -/// ], -/// "properties": { -/// "percentile": { -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "probability": { -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "timestamp": { -/// "title": "EPSS timestamp", -/// "description": "Holds the date and time the EPSS value was recorded.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "qualitative_severity_rating": { -/// "title": "Qualitative Severity Rating", -/// "description": "Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale.", -/// "type": "string", -/// "enum": [ -/// "critical", -/// "high", -/// "low", -/// "medium", -/// "none" -/// ] -/// }, -/// "ssvc_v1": { -/// "type": "object" -/// }, -/// "ssvc_v2": { -/// "type": "object" -/// }, -/// "x_extensions": { -/// "title": "Metrics-content-level Extensions", -/// "description": "Contains a list of extensions valid at the metrics-content-level of the CSAF document and associated with this metric element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "source": { -/// "title": "Source", -/// "description": "Contains the URL of the source that originally determined the metric.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "notes": { -/// "title": "Vulnerability notes", -/// "description": "Holds notes associated with this vulnerability item.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "product_status": { -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "unknown": { -/// "title": "Unknown", -/// "description": "It is not known whether these versions are or are not affected by the vulnerability. There is also no investigation and therefore the status might never be determined.", -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "references": { -/// "title": "Vulnerability references", -/// "description": "Holds a list of references associated with this vulnerability item.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "remediations": { -/// "title": "List of remediations", -/// "description": "Contains a list of remediations.", -/// "type": "array", -/// "items": { -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "fix_planned", -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "optional_patch", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on the category of restart required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "threats": { -/// "title": "List of threats", -/// "description": "Contains information about a vulnerability that can change with time.", -/// "type": "array", -/// "items": { -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "title": { -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "x_extensions": { -/// "title": "Vulnerability-level Extensions", -/// "description": "Contains a list of extensions valid at the vulnerability item level of the CSAF document and associated with this vulnerability element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "x_extensions": { -/// "title": "Root-level Extensions", -/// "description": "Contains a list of extensions valid at the root-level of the CSAF document and associated with this CSAF document.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct CommonSecurityAdvisoryFramework { pub document: DocumentLevelMetaData, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_tree: ::std::option::Option<ProductTree>, ///Contains the URL of the CSAF JSON schema which the document promises to be valid for. #[serde(rename = "$schema")] @@ -2632,7 +857,7 @@ pub struct CommonSecurityAdvisoryFramework { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub vulnerabilities: ::std::vec::Vec<Vulnerability>, ///Contains a list of extensions valid at the root-level of the CSAF document and associated with this CSAF document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub x_extensions: ::std::option::Option<ExtensionsT>, } impl CommonSecurityAdvisoryFramework { @@ -2641,21 +866,6 @@ impl CommonSecurityAdvisoryFramework { } } ///Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ContactDetails(::std::string::String); @@ -2689,14 +899,6 @@ impl ::std::convert::TryFrom<&str> for ContactDetails { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ContactDetails { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ContactDetails { type Error = self::error::ConversionError; fn try_from( @@ -2718,84 +920,7 @@ impl<'de> ::serde::Deserialize<'de> for ContactDetails { } } ///Specifies information about (at least one) metric or score for the given products regarding the current vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Content", -/// "description": "Specifies information about (at least one) metric or score for the given products regarding the current vulnerability.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "cvss_v4": { -/// "type": "object" -/// }, -/// "epss": { -/// "title": "EPSS", -/// "description": "Contains the EPSS data.", -/// "type": "object", -/// "required": [ -/// "percentile", -/// "probability", -/// "timestamp" -/// ], -/// "properties": { -/// "percentile": { -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "probability": { -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "timestamp": { -/// "title": "EPSS timestamp", -/// "description": "Holds the date and time the EPSS value was recorded.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "qualitative_severity_rating": { -/// "title": "Qualitative Severity Rating", -/// "description": "Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale.", -/// "type": "string", -/// "enum": [ -/// "critical", -/// "high", -/// "low", -/// "medium", -/// "none" -/// ] -/// }, -/// "ssvc_v1": { -/// "type": "object" -/// }, -/// "ssvc_v2": { -/// "type": "object" -/// }, -/// "x_extensions": { -/// "title": "Metrics-content-level Extensions", -/// "description": "Contains a list of extensions valid at the metrics-content-level of the CSAF document and associated with this metric element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Content { #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] @@ -2804,56 +929,25 @@ pub struct Content { pub cvss_v3: ::serde_json::Map<::std::string::String, ::serde_json::Value>, #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] pub cvss_v4: ::serde_json::Map<::std::string::String, ::serde_json::Value>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub epss: ::std::option::Option<Epss>, ///Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub qualitative_severity_rating: ::std::option::Option<QualitativeSeverityRating>, #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] pub ssvc_v1: ::serde_json::Map<::std::string::String, ::serde_json::Value>, #[serde(default, skip_serializing_if = "::serde_json::Map::is_empty")] pub ssvc_v2: ::serde_json::Map<::std::string::String, ::serde_json::Value>, ///Contains a list of extensions valid at the metrics-content-level of the CSAF document and associated with this metric element. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub x_extensions: ::std::option::Option<ExtensionsT>, } -impl ::std::default::Default for Content { - fn default() -> Self { - Self { - cvss_v2: Default::default(), - cvss_v3: Default::default(), - cvss_v4: Default::default(), - epss: Default::default(), - qualitative_severity_rating: Default::default(), - ssvc_v1: Default::default(), - ssvc_v2: Default::default(), - x_extensions: Default::default(), - } - } -} impl Content { pub fn builder() -> builder::Content { Default::default() } } ///Contains the name of a contributing organization being recognized. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Contributing organization", -/// "description": "Contains the name of a contributing organization being recognized.", -/// "examples": [ -/// "CISA", -/// "Google Project Zero", -/// "Talos" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ContributingOrganization(::std::string::String); @@ -2887,14 +981,6 @@ impl ::std::convert::TryFrom<&str> for ContributingOrganization { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ContributingOrganization { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ContributingOrganization { type Error = self::error::ConversionError; fn try_from( @@ -2916,86 +1002,11 @@ impl<'de> ::serde::Deserialize<'de> for ContributingOrganization { } } ///Contains all information to identify a file based on its cryptographic hash values. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[0-9a-z][0-9a-z-]*$" -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in lowercase hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-f]{32,}$" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct CryptographicHashes { ///Contains a list of cryptographic hashes for this file. - pub file_hashes: Vec<FileHash>, + pub file_hashes: ::std::vec::Vec<FileHash>, ///Contains the name of the file which is identified by the hash values. pub filename: Filename, } @@ -3005,20 +1016,6 @@ impl CryptographicHashes { } } ///Gives the version of the CSAF specification which the document was generated for. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.1" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -3061,14 +1058,6 @@ impl ::std::convert::TryFrom<&str> for CsafVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CsafVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CsafVersion { type Error = self::error::ConversionError; fn try_from( @@ -3078,18 +1067,6 @@ impl ::std::convert::TryFrom<::std::string::String> for CsafVersion { } } ///Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Cve(::std::string::String); @@ -3125,14 +1102,6 @@ impl ::std::convert::TryFrom<&str> for Cve { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Cve { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Cve { type Error = self::error::ConversionError; fn try_from( @@ -3154,61 +1123,6 @@ impl<'de> ::serde::Deserialize<'de> for Cve { } } ///Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name", -/// "version" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "version": { -/// "title": "CWE version", -/// "description": "Holds the version string of the CWE specification this weakness was extracted from.", -/// "examples": [ -/// "1.0", -/// "3.4.1", -/// "4.0", -/// "4.11", -/// "4.12" -/// ], -/// "type": "string", -/// "pattern": "^[1-9]\\d*\\.([0-9]|([1-9]\\d+))(\\.\\d+)?$" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Cwe { @@ -3225,25 +1139,6 @@ impl Cwe { } } ///Holds the version string of the CWE specification this weakness was extracted from. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "CWE version", -/// "description": "Holds the version string of the CWE specification this weakness was extracted from.", -/// "examples": [ -/// "1.0", -/// "3.4.1", -/// "4.0", -/// "4.11", -/// "4.12" -/// ], -/// "type": "string", -/// "pattern": "^[1-9]\\d*\\.([0-9]|([1-9]\\d+))(\\.\\d+)?$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct CweVersion(::std::string::String); @@ -3284,14 +1179,6 @@ impl ::std::convert::TryFrom<&str> for CweVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for CweVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for CweVersion { type Error = self::error::ConversionError; fn try_from( @@ -3313,18 +1200,6 @@ impl<'de> ::serde::Deserialize<'de> for CweVersion { } } ///Contains a thorough human-readable discussion of the remediation. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DetailsOfTheRemediation(::std::string::String); @@ -3358,14 +1233,6 @@ impl ::std::convert::TryFrom<&str> for DetailsOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DetailsOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DetailsOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -3387,18 +1254,6 @@ impl<'de> ::serde::Deserialize<'de> for DetailsOfTheRemediation { } } ///Represents a thorough human-readable discussion of the threat. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DetailsOfTheThreat(::std::string::String); @@ -3432,14 +1287,6 @@ impl ::std::convert::TryFrom<&str> for DetailsOfTheThreat { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DetailsOfTheThreat { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DetailsOfTheThreat { type Error = self::error::ConversionError; fn try_from( @@ -3461,25 +1308,6 @@ impl<'de> ::serde::Deserialize<'de> for DetailsOfTheThreat { } } ///Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct DocumentCategory(::std::string::String); @@ -3520,14 +1348,6 @@ impl ::std::convert::TryFrom<&str> for DocumentCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DocumentCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DocumentCategory { type Error = self::error::ConversionError; fn try_from( @@ -3549,66 +1369,11 @@ impl<'de> ::serde::Deserialize<'de> for DocumentCategory { } } ///Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct DocumentGenerator { ///This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, pub engine: EngineOfDocumentGeneration, } @@ -3618,443 +1383,13 @@ impl DocumentGenerator { } } ///Captures the meta-data about this document describing a particular set of security advisories. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Document level meta-data", -/// "description": "Captures the meta-data about this document describing a particular set of security advisories.", -/// "type": "object", -/// "required": [ -/// "category", -/// "csaf_version", -/// "distribution", -/// "publisher", -/// "title", -/// "tracking" -/// ], -/// "properties": { -/// "acknowledgments": { -/// "title": "Document acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with the whole document.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "aggregate_severity": { -/// "title": "Aggregate severity", -/// "description": "Is a vehicle that is provided by the document producer to convey the urgency and criticality with which the one or more vulnerabilities reported should be addressed. It is a document-level metric and applied to the document as a whole — not any specific vulnerability. The range of values in this field is defined according to the document producer's policies and procedures.", -/// "type": "object", -/// "required": [ -/// "text" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of aggregate severity", -/// "description": "Points to the namespace so referenced.", -/// "type": "string" -/// }, -/// "text": { -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "category": { -/// "title": "Document category", -/// "description": "Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document.", -/// "examples": [ -/// "csaf_base", -/// "csaf_security_advisory", -/// "csaf_vex", -/// "Example Company Security Notice" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "csaf_version": { -/// "title": "CSAF version", -/// "description": "Gives the version of the CSAF specification which the document was generated for.", -/// "type": "string", -/// "enum": [ -/// "2.1" -/// ] -/// }, -/// "distribution": { -/// "title": "Rules for document sharing", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "required": [ -/// "tlp" -/// ], -/// "properties": { -/// "sharing_group": { -/// "title": "Sharing Group", -/// "description": "Contains information about the group this document is intended to be shared with.", -/// "type": "object", -/// "required": [ -/// "id" -/// ], -/// "properties": { -/// "id": { -/// "title": "Sharing Group ID", -/// "description": "Provides the unique ID for the sharing group.", -/// "type": "string", -/// "format": "uuid", -/// "pattern": "^(([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})|([0]{8}-([0]{4}-){3}[0]{12})|([f]{8}-([f]{4}-){3}[f]{12}))$" -/// }, -/// "name": { -/// "title": "Sharing Group Name", -/// "description": "Contains a human-readable name for the sharing group.", -/// "examples": [ -/// "Customer A", -/// "ISAC members", -/// "NIS2 regulated important entities in Germany, sector water", -/// "Pre-Sharing group for advisory discussion", -/// "Users of Product A", -/// "US Federal Civilian Authorities" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "default": "CLEAR", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "AMBER+STRICT", -/// "CLEAR", -/// "GREEN", -/// "RED" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "lang": { -/// "title": "Document language", -/// "description": "Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "license_expression": { -/// "title": "License expression", -/// "description": "Contains the SPDX license expression for the CSAF document.", -/// "examples": [ -/// "CC-BY-4.0", -/// "LicenseRef-www.example.org-Example-CSAF-License-3.0+", -/// "LicenseRef-scancode-public-domain", -/// "MIT OR any-OSI" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "notes": { -/// "title": "Document notes", -/// "description": "Holds notes associated with the whole document.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "publisher": { -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "multiplier", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "references": { -/// "title": "Document references", -/// "description": "Holds a list of references associated with the whole document.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "source_lang": { -/// "title": "Source language", -/// "description": "If this copy of the document is a translation then the value of this property describes from which language this document was translated.", -/// "$ref": "#/$defs/lang_t" -/// }, -/// "title": { -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tracking": { -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first released to the specified target group.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "x_extensions": { -/// "title": "Document-level Extensions", -/// "description": "Contains a list of extensions valid at the document property level of the CSAF document and associated with this document metadata.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct DocumentLevelMetaData { ///Contains a list of acknowledgment elements associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub acknowledgments: ::std::option::Option<AcknowledgmentsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub aggregate_severity: ::std::option::Option<AggregateSeverity>, ///Defines a short canonical name, chosen by the document producer, which will inform the end user as to the category of document. pub category: DocumentCategory, @@ -4062,26 +1397,26 @@ pub struct DocumentLevelMetaData { pub csaf_version: CsafVersion, pub distribution: RulesForDocumentSharing, ///Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub lang: ::std::option::Option<LangT>, ///Contains the SPDX license expression for the CSAF document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub license_expression: ::std::option::Option<LicenseExpression>, ///Holds notes associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub notes: ::std::option::Option<NotesT>, pub publisher: Publisher, ///Holds a list of references associated with the whole document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub references: ::std::option::Option<ReferencesT>, ///If this copy of the document is a translation then the value of this property describes from which language this document was translated. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub source_lang: ::std::option::Option<LangT>, ///This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents. pub title: TitleOfThisDocument, pub tracking: Tracking, ///Contains a list of extensions valid at the document property level of the CSAF document and associated with this document metadata. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub x_extensions: ::std::option::Option<ExtensionsT>, } impl DocumentLevelMetaData { @@ -4090,22 +1425,6 @@ impl DocumentLevelMetaData { } } ///Defines the draft status of the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -4156,14 +1475,6 @@ impl ::std::convert::TryFrom<&str> for DocumentStatus { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for DocumentStatus { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for DocumentStatus { type Error = self::error::ConversionError; fn try_from( @@ -4173,23 +1484,6 @@ impl ::std::convert::TryFrom<::std::string::String> for DocumentStatus { } } ///Represents the name of the engine that generated the CSAF document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EngineName(::std::string::String); @@ -4223,14 +1517,6 @@ impl ::std::convert::TryFrom<&str> for EngineName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EngineName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EngineName { type Error = self::error::ConversionError; fn try_from( @@ -4252,52 +1538,13 @@ impl<'de> ::serde::Deserialize<'de> for EngineName { } } ///Contains information about the engine that generated the CSAF document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct EngineOfDocumentGeneration { ///Represents the name of the engine that generated the CSAF document. pub name: EngineName, ///Contains the version of the engine that generated the CSAF document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub version: ::std::option::Option<EngineVersion>, } impl EngineOfDocumentGeneration { @@ -4306,23 +1553,6 @@ impl EngineOfDocumentGeneration { } } ///Contains the version of the engine that generated the CSAF document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EngineVersion(::std::string::String); @@ -4356,14 +1586,6 @@ impl ::std::convert::TryFrom<&str> for EngineVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EngineVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EngineVersion { type Error = self::error::ConversionError; fn try_from( @@ -4385,18 +1607,6 @@ impl<'de> ::serde::Deserialize<'de> for EngineVersion { } } ///Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct EntitlementOfTheRemediation(::std::string::String); @@ -4430,14 +1640,6 @@ impl ::std::convert::TryFrom<&str> for EntitlementOfTheRemediation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for EntitlementOfTheRemediation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for EntitlementOfTheRemediation { type Error = self::error::ConversionError; fn try_from( @@ -4459,42 +1661,6 @@ impl<'de> ::serde::Deserialize<'de> for EntitlementOfTheRemediation { } } ///Contains the EPSS data. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "EPSS", -/// "description": "Contains the EPSS data.", -/// "type": "object", -/// "required": [ -/// "percentile", -/// "probability", -/// "timestamp" -/// ], -/// "properties": { -/// "percentile": { -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "probability": { -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "timestamp": { -/// "title": "EPSS timestamp", -/// "description": "Holds the date and time the EPSS value was recorded.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Epss { @@ -4511,96 +1677,41 @@ impl Epss { } } ///Contains a list of extension elements for the current context. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of extensions", -/// "description": "Contains a list of extension elements for the current context.", -/// "type": "array", -/// "items": { -/// "type": "object" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct ExtensionsT( - pub Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + pub ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>, ); impl ::std::ops::Deref for ExtensionsT { - type Target = Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>; + type Target = ::std::vec::Vec< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + >; fn deref( &self, - ) -> &Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>> { + ) -> &::std::vec::Vec< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + > { &self.0 } } impl ::std::convert::From<ExtensionsT> -for Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>> { +for ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>> { fn from(value: ExtensionsT) -> Self { value.0 } } impl ::std::convert::From< - Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + ::std::vec::Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>, > for ExtensionsT { fn from( - value: Vec<::serde_json::Map<::std::string::String, ::serde_json::Value>>, + value: ::std::vec::Vec< + ::serde_json::Map<::std::string::String, ::serde_json::Value>, + >, ) -> Self { Self(value) } } ///Contains one hash value and algorithm of the file to be identified. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[0-9a-z][0-9a-z-]*$" -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in lowercase hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-f]{32,}$" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct FileHash { @@ -4615,23 +1726,6 @@ impl FileHash { } } ///Contains the name of the file which is identified by the hash values. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Filename(::std::string::String); @@ -4665,14 +1759,6 @@ impl ::std::convert::TryFrom<&str> for Filename { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Filename { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Filename { type Error = self::error::ConversionError; fn try_from( @@ -4694,41 +1780,6 @@ impl<'de> ::serde::Deserialize<'de> for Filename { } } ///Contains information on when this vulnerability was first known to be exploited in the wild in the products specified. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "First known exploitation date", -/// "description": "Contains information on when this vulnerability was first known to be exploited in the wild in the products specified.", -/// "type": "object", -/// "minProperties": 3, -/// "required": [ -/// "date", -/// "exploitation_date" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the information", -/// "description": "Contains the date when the information was last updated.", -/// "type": "string" -/// }, -/// "exploitation_date": { -/// "title": "Date of the exploitation", -/// "description": "Contains the date when the exploitation happened.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct FirstKnownExploitationDate { @@ -4736,9 +1787,9 @@ pub struct FirstKnownExploitationDate { pub date: ::std::string::String, ///Contains the date when the exploitation happened. pub exploitation_date: ::std::string::String, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, } impl FirstKnownExploitationDate { @@ -4747,57 +1798,17 @@ impl FirstKnownExploitationDate { } } ///Contains product specific information in regard to this vulnerability as a single machine readable flag. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Flag { ///Contains the date when assessment was done or the flag was assigned. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, ///Specifies the machine readable label. pub label: LabelOfTheFlag, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, } impl Flag { @@ -4806,238 +1817,16 @@ impl Flag { } } ///Specifies information about the product and assigns the product_id. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Full product name", -/// "description": "Specifies information about the product and assigns the product_id.", -/// "type": "object", -/// "required": [ -/// "name", -/// "product_id" -/// ], -/// "properties": { -/// "name": { -/// "title": "Textual description of the product", -/// "description": "The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.", -/// "examples": [ -/// "Cisco AnyConnect Secure Mobility Client 2.3.185", -/// "Microsoft Host Integration Server 2006 Service Pack 1" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "product_id": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "product_identification_helper": { -/// "title": "Helper to identify the product", -/// "description": "Provides at least one method which aids in identifying the product in an asset database.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cpe": { -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^((cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6}))$" -/// }, -/// "hashes": { -/// "title": "List of hashes", -/// "description": "Contains a list of cryptographic hashes usable to identify files.", -/// "type": "array", -/// "items": { -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[0-9a-z][0-9a-z-]*$" -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in lowercase hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-f]{32,}$" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "model_numbers": { -/// "title": "List of models", -/// "description": "Contains a list of model numbers.", -/// "type": "array", -/// "items": { -/// "title": "Model number", -/// "description": "Contains a model number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "purls": { -/// "title": "List of PURLs", -/// "description": "Contains a list of Package-URLs (PURL).", -/// "type": "array", -/// "items": { -/// "title": "Package-URL representation", -/// "description": "The Package-URL (PURL) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[a-z][a-z0-9\\.\\-]*\\/.+" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "sbom_urls": { -/// "title": "List of SBOM URLs", -/// "description": "Contains a list of URLs where SBOMs for this product can be retrieved.", -/// "type": "array", -/// "items": { -/// "title": "SBOM URL", -/// "description": "Contains a URL of one SBOM for this product.", -/// "type": "string" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "serial_numbers": { -/// "title": "List of serial numbers", -/// "description": "Contains a list of serial numbers.", -/// "type": "array", -/// "items": { -/// "title": "Serial number", -/// "description": "Contains a serial number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "skus": { -/// "title": "List of stock keeping units", -/// "description": "Contains a list of stock keeping units.", -/// "type": "array", -/// "items": { -/// "title": "Stock keeping unit", -/// "description": "Contains a stock keeping unit (SKU) which is used in the ordering process to identify the component - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "x_generic_uris": { -/// "title": "List of generic URIs", -/// "description": "Contains a list of identifiers which are either vendor-specific or derived from a standard not yet supported.", -/// "type": "array", -/// "items": { -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "x_extensions": { -/// "title": "Product-level Extensions", -/// "description": "Contains a list of extensions valid at the full product name element level of the CSAF document and associated with this full product name element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct FullProductNameT { ///The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document. pub name: TextualDescriptionOfTheProduct, pub product_id: ProductIdT, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_identification_helper: ::std::option::Option<HelperToIdentifyTheProduct>, ///Contains a list of extensions valid at the full product name element level of the CSAF document and associated with this full product name element. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub x_extensions: ::std::option::Option<ExtensionsT>, } impl FullProductNameT { @@ -5046,34 +1835,6 @@ impl FullProductNameT { } } ///Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct GenericUri { @@ -5088,239 +1849,33 @@ impl GenericUri { } } ///Provides at least one method which aids in identifying the product in an asset database. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Helper to identify the product", -/// "description": "Provides at least one method which aids in identifying the product in an asset database.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cpe": { -/// "title": "Common Platform Enumeration representation", -/// "description": "The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification.", -/// "type": "string", -/// "minLength": 5, -/// "pattern": "^((cpe:2\\.3:[aho\\*\\-](:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){5}(:(([a-zA-Z]{2,3}(-([a-zA-Z]{2}|[0-9]{3}))?)|[\\*\\-]))(:(((\\?*|\\*?)([a-zA-Z0-9\\-\\._]|(\\\\[\\\\\\*\\?!\"#\\$%&'\\(\\)\\+,\\/:;<=>@\\[\\]\\^`\\{\\|\\}~]))+(\\?*|\\*?))|[\\*\\-])){4})|([c][pP][eE]:\\/[AHOaho]?(:[A-Za-z0-9\\._\\-~%]*){0,6}))$" -/// }, -/// "hashes": { -/// "title": "List of hashes", -/// "description": "Contains a list of cryptographic hashes usable to identify files.", -/// "type": "array", -/// "items": { -/// "title": "Cryptographic hashes", -/// "description": "Contains all information to identify a file based on its cryptographic hash values.", -/// "type": "object", -/// "required": [ -/// "file_hashes", -/// "filename" -/// ], -/// "properties": { -/// "file_hashes": { -/// "title": "List of file hashes", -/// "description": "Contains a list of cryptographic hashes for this file.", -/// "type": "array", -/// "items": { -/// "title": "File hash", -/// "description": "Contains one hash value and algorithm of the file to be identified.", -/// "type": "object", -/// "required": [ -/// "algorithm", -/// "value" -/// ], -/// "properties": { -/// "algorithm": { -/// "title": "Algorithm of the cryptographic hash", -/// "description": "Contains the name of the cryptographic hash algorithm used to calculate the value.", -/// "default": "sha256", -/// "examples": [ -/// "blake2b512", -/// "sha256", -/// "sha3-512", -/// "sha384", -/// "sha512" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[0-9a-z][0-9a-z-]*$" -/// }, -/// "value": { -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in lowercase hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-f]{32,}$" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "filename": { -/// "title": "Filename", -/// "description": "Contains the name of the file which is identified by the hash values.", -/// "examples": [ -/// "WINWORD.EXE", -/// "msotadddin.dll", -/// "sudoers.so" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "model_numbers": { -/// "title": "List of models", -/// "description": "Contains a list of model numbers.", -/// "type": "array", -/// "items": { -/// "title": "Model number", -/// "description": "Contains a model number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "purls": { -/// "title": "List of PURLs", -/// "description": "Contains a list of Package-URLs (PURL).", -/// "type": "array", -/// "items": { -/// "title": "Package-URL representation", -/// "description": "The Package-URL (PURL) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[a-z][a-z0-9\\.\\-]*\\/.+" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "sbom_urls": { -/// "title": "List of SBOM URLs", -/// "description": "Contains a list of URLs where SBOMs for this product can be retrieved.", -/// "type": "array", -/// "items": { -/// "title": "SBOM URL", -/// "description": "Contains a URL of one SBOM for this product.", -/// "type": "string" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "serial_numbers": { -/// "title": "List of serial numbers", -/// "description": "Contains a list of serial numbers.", -/// "type": "array", -/// "items": { -/// "title": "Serial number", -/// "description": "Contains a serial number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "skus": { -/// "title": "List of stock keeping units", -/// "description": "Contains a list of stock keeping units.", -/// "type": "array", -/// "items": { -/// "title": "Stock keeping unit", -/// "description": "Contains a stock keeping unit (SKU) which is used in the ordering process to identify the component - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "x_generic_uris": { -/// "title": "List of generic URIs", -/// "description": "Contains a list of identifiers which are either vendor-specific or derived from a standard not yet supported.", -/// "type": "array", -/// "items": { -/// "title": "Generic URI", -/// "description": "Provides a generic extension point for any identifier which is either vendor-specific or derived from a standard not yet supported.", -/// "type": "object", -/// "required": [ -/// "namespace", -/// "uri" -/// ], -/// "properties": { -/// "namespace": { -/// "title": "Namespace of the generic URI", -/// "description": "Refers to a URL which provides the name and knowledge about the specification used or is the namespace in which these values are valid.", -/// "type": "string" -/// }, -/// "uri": { -/// "title": "URI", -/// "description": "Contains the identifier itself.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct HelperToIdentifyTheProduct { ///The Common Platform Enumeration (CPE) attribute refers to a method for naming platforms external to this specification. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub cpe: ::std::option::Option<CommonPlatformEnumerationRepresentation>, ///Contains a list of cryptographic hashes usable to identify files. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub hashes: ::std::option::Option<Vec<CryptographicHashes>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub hashes: ::std::option::Option<::std::vec::Vec<CryptographicHashes>>, ///Contains a list of model numbers. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub model_numbers: ::std::option::Option<Vec<ModelNumber>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub model_numbers: ::std::option::Option<::std::vec::Vec<ModelNumber>>, ///Contains a list of Package-URLs (PURL). - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub purls: ::std::option::Option<Vec<PackageUrlRepresentation>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub purls: ::std::option::Option<::std::vec::Vec<PackageUrlRepresentation>>, ///Contains a list of URLs where SBOMs for this product can be retrieved. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub sbom_urls: ::std::option::Option<Vec<::std::string::String>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub sbom_urls: ::std::option::Option<::std::vec::Vec<::std::string::String>>, ///Contains a list of serial numbers. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub serial_numbers: ::std::option::Option<Vec<SerialNumber>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub serial_numbers: ::std::option::Option<::std::vec::Vec<SerialNumber>>, ///Contains a list of stock keeping units. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub skus: ::std::option::Option<Vec<StockKeepingUnit>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub skus: ::std::option::Option<::std::vec::Vec<StockKeepingUnit>>, ///Contains a list of identifiers which are either vendor-specific or derived from a standard not yet supported. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub x_generic_uris: ::std::option::Option<Vec<GenericUri>>, -} -impl ::std::default::Default for HelperToIdentifyTheProduct { - fn default() -> Self { - Self { - cpe: Default::default(), - hashes: Default::default(), - model_numbers: Default::default(), - purls: Default::default(), - sbom_urls: Default::default(), - serial_numbers: Default::default(), - skus: Default::default(), - x_generic_uris: Default::default(), - } - } + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub x_generic_uris: ::std::option::Option<::std::vec::Vec<GenericUri>>, } impl HelperToIdentifyTheProduct { pub fn builder() -> builder::HelperToIdentifyTheProduct { @@ -5328,58 +1883,12 @@ impl HelperToIdentifyTheProduct { } } ///Contains a single unique label or tracking ID for the vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue", -/// "https://github.com/oasis-tcs/csaf" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210", -/// "#1217" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Id { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, ///Indicates the name of the vulnerability tracking or numbering system. pub system_name: SystemName, @@ -5392,91 +1901,25 @@ impl Id { } } ///Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "contact": { -/// "title": "Party contact information", -/// "description": "Contains the contact information of the party that was used in this state.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Involvement { ///Contains the contact information of the party that was used in this state. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub contact: ::std::option::Option<PartyContactInformation>, ///Holds the date and time of the involvement entry. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, ///Defines the category of the involved party. pub party: PartyCategory, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, ///Defines contact status of the involved party. pub status: PartyStatus, ///Contains additional context regarding what is going on. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option<SummaryOfTheInvolvement>, } impl Involvement { @@ -5485,18 +1928,6 @@ impl Involvement { } } ///Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct IssuingAuthority(::std::string::String); @@ -5530,14 +1961,6 @@ impl ::std::convert::TryFrom<&str> for IssuingAuthority { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for IssuingAuthority { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for IssuingAuthority { type Error = self::error::ConversionError; fn try_from( @@ -5559,20 +1982,6 @@ impl<'de> ::serde::Deserialize<'de> for IssuingAuthority { } } ///Contains the URL of the CSAF JSON schema which the document promises to be valid for. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "JSON schema", -/// "description": "Contains the URL of the CSAF JSON schema which the document promises to be valid for.", -/// "type": "string", -/// "enum": [ -/// "https://docs.oasis-open.org/csaf/csaf/v2.1/schema/csaf.json" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -5621,14 +2030,6 @@ impl ::std::convert::TryFrom<&str> for JsonSchema { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for JsonSchema { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { type Error = self::error::ConversionError; fn try_from( @@ -5638,24 +2039,6 @@ impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { } } ///Specifies the machine readable label. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -5724,14 +2107,6 @@ impl ::std::convert::TryFrom<&str> for LabelOfTheFlag { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LabelOfTheFlag { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LabelOfTheFlag { type Error = self::error::ConversionError; fn try_from( @@ -5741,25 +2116,6 @@ impl ::std::convert::TryFrom<::std::string::String> for LabelOfTheFlag { } } ///Provides the TLP label of the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "default": "CLEAR", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "AMBER+STRICT", -/// "CLEAR", -/// "GREEN", -/// "RED" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -5818,14 +2174,6 @@ impl ::std::convert::TryFrom<&str> for LabelOfTlp { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LabelOfTlp { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LabelOfTlp { type Error = self::error::ConversionError; fn try_from( @@ -5840,25 +2188,6 @@ impl ::std::default::Default for LabelOfTlp { } } ///Identifies a language, corresponding to IETF BCP 47 / RFC 5646. See IETF language registry: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Language type", -/// "description": "Identifies a language, corresponding to IETF BCP 47 / RFC 5646. See IETF language registry: https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry", -/// "examples": [ -/// "de", -/// "en", -/// "fr", -/// "frc", -/// "jp" -/// ], -/// "type": "string", -/// "pattern": "^(([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3}){0,2})?|[A-Za-z]{4,8})(-[A-Za-z]{4})?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-[A-WY-Za-wy-z0-9](-[A-Za-z0-9]{2,8})+)*(-[Xx](-[A-Za-z0-9]{1,8})+)?|[Xx](-[A-Za-z0-9]{1,8})+|[Ii]-[Dd][Ee][Ff][Aa][Uu][Ll][Tt]|[Ii]-[Mm][Ii][Nn][Gg][Oo])$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct LangT(::std::string::String); @@ -5902,14 +2231,6 @@ impl ::std::convert::TryFrom<&str> for LangT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LangT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LangT { type Error = self::error::ConversionError; fn try_from( @@ -5931,18 +2252,6 @@ impl<'de> ::serde::Deserialize<'de> for LangT { } } ///Contains the version string used in an existing document with the same content. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct LegacyVersionOfTheRevision(::std::string::String); @@ -5976,14 +2285,6 @@ impl ::std::convert::TryFrom<&str> for LegacyVersionOfTheRevision { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LegacyVersionOfTheRevision { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LegacyVersionOfTheRevision { type Error = self::error::ConversionError; fn try_from( @@ -6005,24 +2306,6 @@ impl<'de> ::serde::Deserialize<'de> for LegacyVersionOfTheRevision { } } ///Contains the SPDX license expression for the CSAF document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "License expression", -/// "description": "Contains the SPDX license expression for the CSAF document.", -/// "examples": [ -/// "CC-BY-4.0", -/// "LicenseRef-www.example.org-Example-CSAF-License-3.0+", -/// "LicenseRef-scancode-public-domain", -/// "MIT OR any-OSI" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct LicenseExpression(::std::string::String); @@ -6056,14 +2339,6 @@ impl ::std::convert::TryFrom<&str> for LicenseExpression { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for LicenseExpression { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for LicenseExpression { type Error = self::error::ConversionError; fn try_from( @@ -6085,110 +2360,13 @@ impl<'de> ::serde::Deserialize<'de> for LicenseExpression { } } ///Contains all metadata about the metric including products it applies to and the source and the content itself. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "metric", -/// "description": "Contains all metadata about the metric including products it applies to and the source and the content itself.", -/// "type": "object", -/// "required": [ -/// "content", -/// "products" -/// ], -/// "properties": { -/// "content": { -/// "title": "Content", -/// "description": "Specifies information about (at least one) metric or score for the given products regarding the current vulnerability.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "cvss_v4": { -/// "type": "object" -/// }, -/// "epss": { -/// "title": "EPSS", -/// "description": "Contains the EPSS data.", -/// "type": "object", -/// "required": [ -/// "percentile", -/// "probability", -/// "timestamp" -/// ], -/// "properties": { -/// "percentile": { -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "probability": { -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "timestamp": { -/// "title": "EPSS timestamp", -/// "description": "Holds the date and time the EPSS value was recorded.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "qualitative_severity_rating": { -/// "title": "Qualitative Severity Rating", -/// "description": "Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale.", -/// "type": "string", -/// "enum": [ -/// "critical", -/// "high", -/// "low", -/// "medium", -/// "none" -/// ] -/// }, -/// "ssvc_v1": { -/// "type": "object" -/// }, -/// "ssvc_v2": { -/// "type": "object" -/// }, -/// "x_extensions": { -/// "title": "Metrics-content-level Extensions", -/// "description": "Contains a list of extensions valid at the metrics-content-level of the CSAF document and associated with this metric element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "source": { -/// "title": "Source", -/// "description": "Contains the URL of the source that originally determined the metric.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Metric { pub content: Content, pub products: ProductsT, ///Contains the URL of the source that originally determined the metric. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub source: ::std::option::Option<::std::string::String>, } impl Metric { @@ -6197,18 +2375,6 @@ impl Metric { } } ///Contains a model number of the component to identify - possibly with placeholders. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Model number", -/// "description": "Contains a model number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ModelNumber(::std::string::String); @@ -6242,14 +2408,6 @@ impl ::std::convert::TryFrom<&str> for ModelNumber { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ModelNumber { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ModelNumber { type Error = self::error::ConversionError; fn try_from( @@ -6271,23 +2429,6 @@ impl<'de> ::serde::Deserialize<'de> for ModelNumber { } } ///Contains the name of the issuing party. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfPublisher(::std::string::String); @@ -6321,14 +2462,6 @@ impl ::std::convert::TryFrom<&str> for NameOfPublisher { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfPublisher { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfPublisher { type Error = self::error::ConversionError; fn try_from( @@ -6350,28 +2483,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfPublisher { } } ///Contains the canonical descriptor or 'friendly name' of the branch. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of the branch", -/// "description": "Contains the canonical descriptor or 'friendly name' of the branch.", -/// "examples": [ -/// "10", -/// "365", -/// "Microsoft", -/// "Office", -/// "PCS 7", -/// "SIMATIC", -/// "Siemens", -/// "Windows" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheBranch(::std::string::String); @@ -6405,14 +2516,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheBranch { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheBranch { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheBranch { type Error = self::error::ConversionError; fn try_from( @@ -6434,22 +2537,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheBranch { } } ///Contains the name of a single contributor being recognized. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of the contributor", -/// "description": "Contains the name of a single contributor being recognized.", -/// "examples": [ -/// "Albert Einstein", -/// "Johann Sebastian Bach" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheContributor(::std::string::String); @@ -6483,14 +2570,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheContributor { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheContributor { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheContributor { type Error = self::error::ConversionError; fn try_from( @@ -6512,90 +2591,22 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheContributor { } } ///Is a place to put all manner of text blobs related to the current context. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Note", -/// "description": "Is a place to put all manner of text blobs related to the current context.", -/// "type": "object", -/// "required": [ -/// "category", -/// "text" -/// ], -/// "properties": { -/// "audience": { -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "category": { -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "text": { -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "title": { -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Note { ///Indicates who is intended to read it. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub audience: ::std::option::Option<AudienceOfNote>, ///Contains the information of what kind of note this is. pub category: NoteCategory, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, ///Holds the content of the note. Content varies depending on type. pub text: NoteContent, ///Provides a concise description of what is contained in the text of the note. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub title: ::std::option::Option<TitleOfNote>, } impl Note { @@ -6604,26 +2615,6 @@ impl Note { } } ///Contains the information of what kind of note this is. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -6690,14 +2681,6 @@ impl ::std::convert::TryFrom<&str> for NoteCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NoteCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NoteCategory { type Error = self::error::ConversionError; fn try_from( @@ -6707,18 +2690,6 @@ impl ::std::convert::TryFrom<::std::string::String> for NoteCategory { } } ///Holds the content of the note. Content varies depending on type. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NoteContent(::std::string::String); @@ -6741,21 +2712,13 @@ impl ::std::str::FromStr for NoteContent { if value.chars().count() < 1usize { return Err("shorter than 1 characters".into()); } - Ok(Self(value.to_string())) - } -} -impl ::std::convert::TryFrom<&str> for NoteContent { - type Error = self::error::ConversionError; - fn try_from( - value: &str, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() + Ok(Self(value.to_string())) } } -impl ::std::convert::TryFrom<&::std::string::String> for NoteContent { +impl ::std::convert::TryFrom<&str> for NoteContent { type Error = self::error::ConversionError; fn try_from( - value: &::std::string::String, + value: &str, ) -> ::std::result::Result<Self, self::error::ConversionError> { value.parse() } @@ -6781,80 +2744,6 @@ impl<'de> ::serde::Deserialize<'de> for NoteContent { } } ///Contains notes which are specific to the current context. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of notes", -/// "description": "Contains notes which are specific to the current context.", -/// "type": "array", -/// "items": { -/// "title": "Note", -/// "description": "Is a place to put all manner of text blobs related to the current context.", -/// "type": "object", -/// "required": [ -/// "category", -/// "text" -/// ], -/// "properties": { -/// "audience": { -/// "title": "Audience of note", -/// "description": "Indicates who is intended to read it.", -/// "examples": [ -/// "all", -/// "executives", -/// "operational management and system administrators", -/// "safety engineers" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "category": { -/// "title": "Note category", -/// "description": "Contains the information of what kind of note this is.", -/// "type": "string", -/// "enum": [ -/// "description", -/// "details", -/// "faq", -/// "general", -/// "legal_disclaimer", -/// "other", -/// "summary" -/// ] -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "text": { -/// "title": "Note content", -/// "description": "Holds the content of the note. Content varies depending on type.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "title": { -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct NotesT(pub ::std::vec::Vec<Note>); @@ -6875,19 +2764,6 @@ impl ::std::convert::From<::std::vec::Vec<Note>> for NotesT { } } ///The Package-URL (PURL) attribute refers to a method for reliably identifying and locating software packages external to this specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Package-URL representation", -/// "description": "The Package-URL (PURL) attribute refers to a method for reliably identifying and locating software packages external to this specification.", -/// "type": "string", -/// "minLength": 7, -/// "pattern": "^pkg:[a-z][a-z0-9\\.\\-]*\\/.+" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct PackageUrlRepresentation(::std::string::String); @@ -6928,14 +2804,6 @@ impl ::std::convert::TryFrom<&str> for PackageUrlRepresentation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PackageUrlRepresentation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PackageUrlRepresentation { type Error = self::error::ConversionError; fn try_from( @@ -6957,24 +2825,6 @@ impl<'de> ::serde::Deserialize<'de> for PackageUrlRepresentation { } } ///Defines the category of the involved party. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -7033,14 +2883,6 @@ impl ::std::convert::TryFrom<&str> for PartyCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PartyCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PartyCategory { type Error = self::error::ConversionError; fn try_from( @@ -7050,18 +2892,6 @@ impl ::std::convert::TryFrom<::std::string::String> for PartyCategory { } } ///Contains the contact information of the party that was used in this state. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Party contact information", -/// "description": "Contains the contact information of the party that was used in this state.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct PartyContactInformation(::std::string::String); @@ -7095,14 +2925,6 @@ impl ::std::convert::TryFrom<&str> for PartyContactInformation { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PartyContactInformation { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PartyContactInformation { type Error = self::error::ConversionError; fn try_from( @@ -7124,25 +2946,6 @@ impl<'de> ::serde::Deserialize<'de> for PartyContactInformation { } } ///Defines contact status of the involved party. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -7205,14 +3008,6 @@ impl ::std::convert::TryFrom<&str> for PartyStatus { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for PartyStatus { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for PartyStatus { type Error = self::error::ConversionError; fn try_from( @@ -7222,18 +3017,6 @@ impl ::std::convert::TryFrom<::std::string::String> for PartyStatus { } } ///Contains the rank ordering of probabilities from highest to lowest. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Percentile(::std::string::String); @@ -7271,14 +3054,6 @@ impl ::std::convert::TryFrom<&str> for Percentile { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Percentile { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Percentile { type Error = self::error::ConversionError; fn try_from( @@ -7300,18 +3075,6 @@ impl<'de> ::serde::Deserialize<'de> for Percentile { } } ///Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Probability(::std::string::String); @@ -7349,14 +3112,6 @@ impl ::std::convert::TryFrom<&str> for Probability { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Probability { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Probability { type Error = self::error::ConversionError; fn try_from( @@ -7378,55 +3133,14 @@ impl<'de> ::serde::Deserialize<'de> for Probability { } } ///Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct ProductGroup { pub group_id: ProductGroupIdT, ///Lists the product_ids of those products which known as one group in the document. - pub product_ids: Vec<ProductIdT>, + pub product_ids: ::std::vec::Vec<ProductIdT>, ///Gives a short, optional description of the group. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub summary: ::std::option::Option<SummaryOfTheProductGroup>, } impl ProductGroup { @@ -7435,23 +3149,6 @@ impl ProductGroup { } } ///Token required to identify a group of products so that it can be referred to from other parts in the document. There is no predefined or required format for the product_group_id as long as it uniquely identifies a group in the context of the current document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Reference token for product group instance", -/// "description": "Token required to identify a group of products so that it can be referred to from other parts in the document. There is no predefined or required format for the product_group_id as long as it uniquely identifies a group in the context of the current document.", -/// "examples": [ -/// "CSAFGID-0001", -/// "CSAFGID-0002", -/// "CSAFGID-0020" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ProductGroupIdT(::std::string::String); @@ -7485,14 +3182,6 @@ impl ::std::convert::TryFrom<&str> for ProductGroupIdT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ProductGroupIdT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ProductGroupIdT { type Error = self::error::ConversionError; fn try_from( @@ -7514,58 +3203,26 @@ impl<'de> ::serde::Deserialize<'de> for ProductGroupIdT { } } ///Specifies a list of product_group_ids to give context to the parent item. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of product_group_ids", -/// "description": "Specifies a list of product_group_ids to give context to the parent item.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] -pub struct ProductGroupsT(pub Vec<ProductGroupIdT>); +pub struct ProductGroupsT(pub ::std::vec::Vec<ProductGroupIdT>); impl ::std::ops::Deref for ProductGroupsT { - type Target = Vec<ProductGroupIdT>; - fn deref(&self) -> &Vec<ProductGroupIdT> { + type Target = ::std::vec::Vec<ProductGroupIdT>; + fn deref(&self) -> &::std::vec::Vec<ProductGroupIdT> { &self.0 } } -impl ::std::convert::From<ProductGroupsT> for Vec<ProductGroupIdT> { +impl ::std::convert::From<ProductGroupsT> for ::std::vec::Vec<ProductGroupIdT> { fn from(value: ProductGroupsT) -> Self { value.0 } } -impl ::std::convert::From<Vec<ProductGroupIdT>> for ProductGroupsT { - fn from(value: Vec<ProductGroupIdT>) -> Self { +impl ::std::convert::From<::std::vec::Vec<ProductGroupIdT>> for ProductGroupsT { + fn from(value: ::std::vec::Vec<ProductGroupIdT>) -> Self { Self(value) } } ///Token required to identify a full_product_name so that it can be referred to from other parts in the document. There is no predefined or required format for the product_id as long as it uniquely identifies a product in the context of the current document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Reference token for product instance", -/// "description": "Token required to identify a full_product_name so that it can be referred to from other parts in the document. There is no predefined or required format for the product_id as long as it uniquely identifies a product in the context of the current document.", -/// "examples": [ -/// "CSAFPID-0004", -/// "CSAFPID-0008" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ProductIdT(::std::string::String); @@ -7599,14 +3256,6 @@ impl ::std::convert::TryFrom<&str> for ProductIdT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ProductIdT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ProductIdT { type Error = self::error::ConversionError; fn try_from( @@ -7628,42 +3277,6 @@ impl<'de> ::serde::Deserialize<'de> for ProductIdT { } } ///Establishes a path along existing full_product_name_t elements, allowing the document producer to define a path of multiple products that form a new full_product_name entry. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Product path", -/// "description": "Establishes a path along existing full_product_name_t elements, allowing the document producer to define a path of multiple products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "beginning_product_reference", -/// "full_product_name", -/// "subpaths" -/// ], -/// "properties": { -/// "beginning_product_reference": { -/// "title": "Beginning product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is the beginning node of the product path.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "subpaths": { -/// "title": "List of product subpaths", -/// "description": "Contains an ordered list of product subpaths, each one relating to the path defined by all previous elements up to the beginning node of the product path.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/subpath_t" -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct ProductPath { @@ -7679,226 +3292,47 @@ impl ProductPath { } } ///Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "unknown": { -/// "title": "Unknown", -/// "description": "It is not known whether these versions are or are not affected by the vulnerability. There is also no investigation and therefore the status might never be determined.", -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct ProductStatus { ///These are the first versions of the releases known to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub first_affected: ::std::option::Option<ProductsT>, ///These versions contain the first fix for the vulnerability but may not be the recommended fixed versions. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub first_fixed: ::std::option::Option<ProductsT>, ///These versions contain a fix for the vulnerability but may not be the recommended fixed versions. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub fixed: ::std::option::Option<ProductsT>, ///These versions are known to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub known_affected: ::std::option::Option<ProductsT>, ///These versions are known not to be affected by the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub known_not_affected: ::std::option::Option<ProductsT>, ///These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub last_affected: ::std::option::Option<ProductsT>, ///These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub recommended: ::std::option::Option<ProductsT>, ///It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub under_investigation: ::std::option::Option<ProductsT>, ///It is not known whether these versions are or are not affected by the vulnerability. There is also no investigation and therefore the status might never be determined. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub unknown: ::std::option::Option<ProductsT>, } -impl ::std::default::Default for ProductStatus { - fn default() -> Self { - Self { - first_affected: Default::default(), - first_fixed: Default::default(), - fixed: Default::default(), - known_affected: Default::default(), - known_not_affected: Default::default(), - last_affected: Default::default(), - recommended: Default::default(), - under_investigation: Default::default(), - unknown: Default::default(), - } - } -} impl ProductStatus { pub fn builder() -> builder::ProductStatus { Default::default() } } ///Is a container for all fully qualified product names that can be referenced elsewhere in the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Product tree", -/// "description": "Is a container for all fully qualified product names that can be referenced elsewhere in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "branches": { -/// "$ref": "#/$defs/branches_t" -/// }, -/// "full_product_names": { -/// "title": "List of full product names", -/// "description": "Contains a list of full product names.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "minItems": 1 -/// }, -/// "product_groups": { -/// "title": "List of product groups", -/// "description": "Contains a list of product groups.", -/// "type": "array", -/// "items": { -/// "title": "Product group", -/// "description": "Defines a new logical group of products that can then be referred to in other parts of the document to address a group of products with a single identifier.", -/// "type": "object", -/// "required": [ -/// "group_id", -/// "product_ids" -/// ], -/// "properties": { -/// "group_id": { -/// "$ref": "#/$defs/product_group_id_t" -/// }, -/// "product_ids": { -/// "title": "List of Product IDs", -/// "description": "Lists the product_ids of those products which known as one group in the document.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 2, -/// "uniqueItems": true -/// }, -/// "summary": { -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "product_paths": { -/// "title": "List of product paths", -/// "description": "Contains a list of product paths.", -/// "type": "array", -/// "items": { -/// "title": "Product path", -/// "description": "Establishes a path along existing full_product_name_t elements, allowing the document producer to define a path of multiple products that form a new full_product_name entry.", -/// "type": "object", -/// "required": [ -/// "beginning_product_reference", -/// "full_product_name", -/// "subpaths" -/// ], -/// "properties": { -/// "beginning_product_reference": { -/// "title": "Beginning product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is the beginning node of the product path.", -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "full_product_name": { -/// "$ref": "#/$defs/full_product_name_t" -/// }, -/// "subpaths": { -/// "title": "List of product subpaths", -/// "description": "Contains an ordered list of product subpaths, each one relating to the path defined by all previous elements up to the beginning node of the product path.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/subpath_t" -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct ProductTree { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub branches: ::std::option::Option<BranchesT>, ///Contains a list of full product names. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] @@ -7910,136 +3344,42 @@ pub struct ProductTree { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub product_paths: ::std::vec::Vec<ProductPath>, } -impl ::std::default::Default for ProductTree { - fn default() -> Self { - Self { - branches: Default::default(), - full_product_names: Default::default(), - product_groups: Default::default(), - product_paths: Default::default(), - } - } -} impl ProductTree { pub fn builder() -> builder::ProductTree { Default::default() } } ///Specifies a list of product_ids to give context to the parent item. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of product_ids", -/// "description": "Specifies a list of product_ids to give context to the parent item.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/product_id_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] -pub struct ProductsT(pub Vec<ProductIdT>); +pub struct ProductsT(pub ::std::vec::Vec<ProductIdT>); impl ::std::ops::Deref for ProductsT { - type Target = Vec<ProductIdT>; - fn deref(&self) -> &Vec<ProductIdT> { + type Target = ::std::vec::Vec<ProductIdT>; + fn deref(&self) -> &::std::vec::Vec<ProductIdT> { &self.0 } } -impl ::std::convert::From<ProductsT> for Vec<ProductIdT> { +impl ::std::convert::From<ProductsT> for ::std::vec::Vec<ProductIdT> { fn from(value: ProductsT) -> Self { value.0 } } -impl ::std::convert::From<Vec<ProductIdT>> for ProductsT { - fn from(value: Vec<ProductIdT>) -> Self { +impl ::std::convert::From<::std::vec::Vec<ProductIdT>> for ProductsT { + fn from(value: ::std::vec::Vec<ProductIdT>) -> Self { Self(value) } } ///Provides information about the publisher of the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Publisher", -/// "description": "Provides information about the publisher of the document.", -/// "type": "object", -/// "required": [ -/// "category", -/// "name", -/// "namespace" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of publisher", -/// "description": "Provides information about the category of publisher releasing the document.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "multiplier", -/// "other", -/// "translator", -/// "user", -/// "vendor" -/// ] -/// }, -/// "contact_details": { -/// "title": "Contact details", -/// "description": "Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses.", -/// "examples": [ -/// "Example Company can be reached at contact_us@example.com, or via our website at https://www.example.com/contact." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "issuing_authority": { -/// "title": "Issuing authority", -/// "description": "Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "name": { -/// "title": "Name of publisher", -/// "description": "Contains the name of the issuing party.", -/// "examples": [ -/// "BSI", -/// "Cisco PSIRT", -/// "Siemens ProductCERT" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "namespace": { -/// "title": "Namespace of publisher", -/// "description": "Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party.", -/// "examples": [ -/// "https://csaf.io", -/// "https://www.example.com" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Publisher { ///Provides information about the category of publisher releasing the document. pub category: CategoryOfPublisher, ///Information on how to contact the publisher, possibly including details such as web sites, email addresses, phone numbers, and postal mail addresses. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub contact_details: ::std::option::Option<ContactDetails>, ///Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub issuing_authority: ::std::option::Option<IssuingAuthority>, ///Contains the name of the issuing party. pub name: NameOfPublisher, @@ -8052,24 +3392,6 @@ impl Publisher { } } ///Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Qualitative Severity Rating", -/// "description": "Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale.", -/// "type": "string", -/// "enum": [ -/// "critical", -/// "high", -/// "low", -/// "medium", -/// "none" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -8128,14 +3450,6 @@ impl ::std::convert::TryFrom<&str> for QualitativeSeverityRating { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for QualitativeSeverityRating { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for QualitativeSeverityRating { type Error = self::error::ConversionError; fn try_from( @@ -8145,45 +3459,6 @@ impl ::std::convert::TryFrom<::std::string::String> for QualitativeSeverityRatin } } ///Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Reference", -/// "description": "Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer.", -/// "type": "object", -/// "required": [ -/// "summary", -/// "url" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "url": { -/// "title": "URL of reference", -/// "description": "Provides the URL for the reference.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Reference { @@ -8201,51 +3476,6 @@ impl Reference { } } ///Holds a list of references. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "List of references", -/// "description": "Holds a list of references.", -/// "type": "array", -/// "items": { -/// "title": "Reference", -/// "description": "Holds any reference to conferences, papers, advisories, and other resources that are related and considered related to either a surrounding part of or the entire document and to be of value to the document consumer.", -/// "type": "object", -/// "required": [ -/// "summary", -/// "url" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of reference", -/// "description": "Indicates whether the reference points to the same document or vulnerability in focus (depending on scope) or to an external resource.", -/// "default": "external", -/// "type": "string", -/// "enum": [ -/// "external", -/// "self" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "url": { -/// "title": "URL of reference", -/// "description": "Provides the URL for the reference.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(transparent)] pub struct ReferencesT(pub ::std::vec::Vec<Reference>); @@ -8266,24 +3496,6 @@ impl ::std::convert::From<::std::vec::Vec<Reference>> for ReferencesT { } } ///Defines the category of relationship between the previous item and the referenced next product. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Relationship category", -/// "description": "Defines the category of relationship between the previous item and the referenced next product.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -8342,14 +3554,6 @@ impl ::std::convert::TryFrom<&str> for RelationshipCategory { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for RelationshipCategory { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for RelationshipCategory { type Error = self::error::ConversionError; fn try_from( @@ -8359,126 +3563,27 @@ impl ::std::convert::TryFrom<::std::string::String> for RelationshipCategory { } } ///Specifies details on how to handle (and presumably, fix) a vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "fix_planned", -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "optional_patch", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on the category of restart required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Remediation { ///Specifies the category which this remediation belongs to. pub category: CategoryOfTheRemediation, ///Contains the date from which the remediation is available. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, ///Contains a thorough human-readable discussion of the remediation. pub details: DetailsOfTheRemediation, ///Contains a list of entitlements. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub entitlements: ::std::vec::Vec<EntitlementOfTheRemediation>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub restart_required: ::std::option::Option<RestartRequiredByRemediation>, ///Contains the URL where to obtain the remediation. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub url: ::std::option::Option<::std::string::String>, } impl Remediation { @@ -8487,52 +3592,13 @@ impl Remediation { } } ///Provides information on the category of restart required by this remediation to become effective. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Restart required by remediation", -/// "description": "Provides information on the category of restart required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct RestartRequiredByRemediation { ///Specifies what category of restart is required by this remediation to become effective. pub category: CategoryOfRestart, ///Provides additional information for the restart. This can include details on procedures, scope or impact. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub details: ::std::option::Option<AdditionalRestartInformation>, } impl RestartRequiredByRemediation { @@ -8541,55 +3607,13 @@ impl RestartRequiredByRemediation { } } ///Contains all the information elements required to track the evolution of a CSAF document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Revision { ///The date of the revision entry pub date: ::std::string::String, ///Contains the version string used in an existing document with the same content. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub legacy_version: ::std::option::Option<LegacyVersionOfTheRevision>, pub number: VersionT, ///Holds a single non-empty string representing a short description of the changes. @@ -8601,107 +3625,13 @@ impl Revision { } } ///Describe any constraints on how this document might be shared. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Rules for document sharing", -/// "description": "Describe any constraints on how this document might be shared.", -/// "type": "object", -/// "required": [ -/// "tlp" -/// ], -/// "properties": { -/// "sharing_group": { -/// "title": "Sharing Group", -/// "description": "Contains information about the group this document is intended to be shared with.", -/// "type": "object", -/// "required": [ -/// "id" -/// ], -/// "properties": { -/// "id": { -/// "title": "Sharing Group ID", -/// "description": "Provides the unique ID for the sharing group.", -/// "type": "string", -/// "format": "uuid", -/// "pattern": "^(([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})|([0]{8}-([0]{4}-){3}[0]{12})|([f]{8}-([f]{4}-){3}[f]{12}))$" -/// }, -/// "name": { -/// "title": "Sharing Group Name", -/// "description": "Contains a human-readable name for the sharing group.", -/// "examples": [ -/// "Customer A", -/// "ISAC members", -/// "NIS2 regulated important entities in Germany, sector water", -/// "Pre-Sharing group for advisory discussion", -/// "Users of Product A", -/// "US Federal Civilian Authorities" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "text": { -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "tlp": { -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "default": "CLEAR", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "AMBER+STRICT", -/// "CLEAR", -/// "GREEN", -/// "RED" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct RulesForDocumentSharing { - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub sharing_group: ::std::option::Option<SharingGroup>, ///Provides a textual description of additional constraints. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub text: ::std::option::Option<TextualDescription>, pub tlp: TrafficLightProtocolTlp, } @@ -8711,18 +3641,6 @@ impl RulesForDocumentSharing { } } ///Contains a serial number of the component to identify - possibly with placeholders. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Serial number", -/// "description": "Contains a serial number of the component to identify - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SerialNumber(::std::string::String); @@ -8756,14 +3674,6 @@ impl ::std::convert::TryFrom<&str> for SerialNumber { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SerialNumber { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SerialNumber { type Error = self::error::ConversionError; fn try_from( @@ -8785,51 +3695,13 @@ impl<'de> ::serde::Deserialize<'de> for SerialNumber { } } ///Contains information about the group this document is intended to be shared with. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Sharing Group", -/// "description": "Contains information about the group this document is intended to be shared with.", -/// "type": "object", -/// "required": [ -/// "id" -/// ], -/// "properties": { -/// "id": { -/// "title": "Sharing Group ID", -/// "description": "Provides the unique ID for the sharing group.", -/// "type": "string", -/// "format": "uuid", -/// "pattern": "^(([0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}-[0-9a-f]{12})|([0]{8}-([0]{4}-){3}[0]{12})|([f]{8}-([f]{4}-){3}[f]{12}))$" -/// }, -/// "name": { -/// "title": "Sharing Group Name", -/// "description": "Contains a human-readable name for the sharing group.", -/// "examples": [ -/// "Customer A", -/// "ISAC members", -/// "NIS2 regulated important entities in Germany, sector water", -/// "Pre-Sharing group for advisory discussion", -/// "Users of Product A", -/// "US Federal Civilian Authorities" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct SharingGroup { ///Provides the unique ID for the sharing group. pub id: ::uuid::Uuid, ///Contains a human-readable name for the sharing group. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub name: ::std::option::Option<SharingGroupName>, } impl SharingGroup { @@ -8838,26 +3710,6 @@ impl SharingGroup { } } ///Contains a human-readable name for the sharing group. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Sharing Group Name", -/// "description": "Contains a human-readable name for the sharing group.", -/// "examples": [ -/// "Customer A", -/// "ISAC members", -/// "NIS2 regulated important entities in Germany, sector water", -/// "Pre-Sharing group for advisory discussion", -/// "Users of Product A", -/// "US Federal Civilian Authorities" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SharingGroupName(::std::string::String); @@ -8891,14 +3743,6 @@ impl ::std::convert::TryFrom<&str> for SharingGroupName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SharingGroupName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SharingGroupName { type Error = self::error::ConversionError; fn try_from( @@ -8920,18 +3764,6 @@ impl<'de> ::serde::Deserialize<'de> for SharingGroupName { } } ///Contains a stock keeping unit (SKU) which is used in the ordering process to identify the component - possibly with placeholders. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Stock keeping unit", -/// "description": "Contains a stock keeping unit (SKU) which is used in the ordering process to identify the component - possibly with placeholders.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct StockKeepingUnit(::std::string::String); @@ -8965,14 +3797,6 @@ impl ::std::convert::TryFrom<&str> for StockKeepingUnit { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for StockKeepingUnit { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for StockKeepingUnit { type Error = self::error::ConversionError; fn try_from( @@ -8994,41 +3818,6 @@ impl<'de> ::serde::Deserialize<'de> for StockKeepingUnit { } } ///Contains the next node along the current path and its relationship to the previous node. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Subpath", -/// "description": "Contains the next node along the current path and its relationship to the previous node.", -/// "type": "object", -/// "required": [ -/// "category", -/// "next_product_reference" -/// ], -/// "properties": { -/// "category": { -/// "title": "Relationship category", -/// "description": "Defines the category of relationship between the previous item and the referenced next product.", -/// "type": "string", -/// "enum": [ -/// "default_component_of", -/// "external_component_of", -/// "installed_on", -/// "installed_with", -/// "optional_component_of" -/// ] -/// }, -/// "next_product_reference": { -/// "title": "Next product reference", -/// "description": "Holds a Product ID that refers to the Full Product Name element, which is referenced as the second element of the relationship.", -/// "$ref": "#/$defs/product_id_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct SubpathT { @@ -9043,21 +3832,6 @@ impl SubpathT { } } ///SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Summary of the acknowledgment", -/// "description": "SHOULD represent any contextual details the document producers wish to make known about the acknowledgment or acknowledged parties.", -/// "examples": [ -/// "First analysis of Coordinated Multi-Stream Attack (CMSA)" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheAcknowledgment(::std::string::String); @@ -9091,14 +3865,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheAcknowledgment { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheAcknowledgment { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheAcknowledgment { type Error = self::error::ConversionError; fn try_from( @@ -9120,18 +3886,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheAcknowledgment { } } ///Contains additional context regarding what is going on. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheInvolvement(::std::string::String); @@ -9165,14 +3919,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheInvolvement { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheInvolvement { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheInvolvement { type Error = self::error::ConversionError; fn try_from( @@ -9194,22 +3940,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheInvolvement { } } ///Gives a short, optional description of the group. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Summary of the product group", -/// "description": "Gives a short, optional description of the group.", -/// "examples": [ -/// "Products supporting Modbus.", -/// "The x64 versions of the operating system." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheProductGroup(::std::string::String); @@ -9243,14 +3973,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheProductGroup { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheProductGroup { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheProductGroup { type Error = self::error::ConversionError; fn try_from( @@ -9272,18 +3994,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheProductGroup { } } ///Indicates what this reference refers to. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Summary of the reference", -/// "description": "Indicates what this reference refers to.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheReference(::std::string::String); @@ -9317,14 +4027,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheReference { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheReference { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheReference { type Error = self::error::ConversionError; fn try_from( @@ -9346,21 +4048,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheReference { } } ///Holds a single non-empty string representing a short description of the changes. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SummaryOfTheRevision(::std::string::String); @@ -9394,14 +4081,6 @@ impl ::std::convert::TryFrom<&str> for SummaryOfTheRevision { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SummaryOfTheRevision { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SummaryOfTheRevision { type Error = self::error::ConversionError; fn try_from( @@ -9423,23 +4102,6 @@ impl<'de> ::serde::Deserialize<'de> for SummaryOfTheRevision { } } ///Indicates the name of the vulnerability tracking or numbering system. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue", -/// "https://github.com/oasis-tcs/csaf" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct SystemName(::std::string::String); @@ -9473,14 +4135,6 @@ impl ::std::convert::TryFrom<&str> for SystemName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for SystemName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for SystemName { type Error = self::error::ConversionError; fn try_from( @@ -9502,23 +4156,6 @@ impl<'de> ::serde::Deserialize<'de> for SystemName { } } ///Is unique label or tracking ID for the vulnerability (if such information exists). -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210", -/// "#1217" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Text(::std::string::String); @@ -9552,14 +4189,6 @@ impl ::std::convert::TryFrom<&str> for Text { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Text { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Text { type Error = self::error::ConversionError; fn try_from( @@ -9581,23 +4210,6 @@ impl<'de> ::serde::Deserialize<'de> for Text { } } ///Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS). -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Text of aggregate severity", -/// "description": "Provides a severity which is independent of - and in addition to - any other standard metric for determining the impact or severity of a given vulnerability (such as CVSS).", -/// "examples": [ -/// "Critical", -/// "Important", -/// "Moderate" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextOfAggregateSeverity(::std::string::String); @@ -9631,14 +4243,6 @@ impl ::std::convert::TryFrom<&str> for TextOfAggregateSeverity { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextOfAggregateSeverity { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextOfAggregateSeverity { type Error = self::error::ConversionError; fn try_from( @@ -9660,23 +4264,6 @@ impl<'de> ::serde::Deserialize<'de> for TextOfAggregateSeverity { } } ///Provides a textual description of additional constraints. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Textual description", -/// "description": "Provides a textual description of additional constraints.", -/// "examples": [ -/// "Copyright 2021, Example Company, All Rights Reserved.", -/// "Distribute freely.", -/// "Share only on a need-to-know-basis only." -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextualDescription(::std::string::String); @@ -9710,14 +4297,6 @@ impl ::std::convert::TryFrom<&str> for TextualDescription { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextualDescription { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextualDescription { type Error = self::error::ConversionError; fn try_from( @@ -9739,22 +4318,6 @@ impl<'de> ::serde::Deserialize<'de> for TextualDescription { } } ///The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Textual description of the product", -/// "description": "The value should be the product’s full canonical name, including version number and other attributes, as it would be used in a human-friendly document.", -/// "examples": [ -/// "Cisco AnyConnect Secure Mobility Client 2.3.185", -/// "Microsoft Host Integration Server 2006 Service Pack 1" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TextualDescriptionOfTheProduct(::std::string::String); @@ -9788,14 +4351,6 @@ impl ::std::convert::TryFrom<&str> for TextualDescriptionOfTheProduct { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TextualDescriptionOfTheProduct { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TextualDescriptionOfTheProduct { type Error = self::error::ConversionError; fn try_from( @@ -9817,64 +4372,19 @@ impl<'de> ::serde::Deserialize<'de> for TextualDescriptionOfTheProduct { } } ///Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Threat { ///Categorizes the threat according to the rules of the specification. pub category: CategoryOfTheThreat, ///Contains the date when the assessment was done or the threat appeared. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub date: ::std::option::Option<::std::string::String>, ///Represents a thorough human-readable discussion of the threat. pub details: DetailsOfTheThreat, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub group_ids: ::std::option::Option<ProductGroupsT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_ids: ::std::option::Option<ProductsT>, } impl Threat { @@ -9883,18 +4393,6 @@ impl Threat { } } ///Gives the document producer the ability to apply a canonical name or title to the vulnerability. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct Title(::std::string::String); @@ -9928,14 +4426,6 @@ impl ::std::convert::TryFrom<&str> for Title { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for Title { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for Title { type Error = self::error::ConversionError; fn try_from( @@ -9957,24 +4447,6 @@ impl<'de> ::serde::Deserialize<'de> for Title { } } ///Provides a concise description of what is contained in the text of the note. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Title of note", -/// "description": "Provides a concise description of what is contained in the text of the note.", -/// "examples": [ -/// "Details", -/// "Executive summary", -/// "Technical summary", -/// "Impact on safety systems" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TitleOfNote(::std::string::String); @@ -10008,14 +4480,6 @@ impl ::std::convert::TryFrom<&str> for TitleOfNote { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TitleOfNote { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TitleOfNote { type Error = self::error::ConversionError; fn try_from( @@ -10037,22 +4501,6 @@ impl<'de> ::serde::Deserialize<'de> for TitleOfNote { } } ///This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Title of this document", -/// "description": "This SHOULD be a canonical name for the document, and sufficiently unique to distinguish it from similar documents.", -/// "examples": [ -/// "Cisco IPv6 Crafted Packet Denial of Service Vulnerability", -/// "Example Company Cross-Site-Scripting Vulnerability in Example Generator" -/// ], -/// "type": "string", -/// "minLength": 1 -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct TitleOfThisDocument(::std::string::String); @@ -10086,14 +4534,6 @@ impl ::std::convert::TryFrom<&str> for TitleOfThisDocument { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TitleOfThisDocument { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TitleOfThisDocument { type Error = self::error::ConversionError; fn try_from( @@ -10115,179 +4555,15 @@ impl<'de> ::serde::Deserialize<'de> for TitleOfThisDocument { } } ///Is a container designated to hold all management attributes necessary to track a CSAF document as a whole. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Tracking", -/// "description": "Is a container designated to hold all management attributes necessary to track a CSAF document as a whole.", -/// "type": "object", -/// "required": [ -/// "current_release_date", -/// "id", -/// "initial_release_date", -/// "revision_history", -/// "status", -/// "version" -/// ], -/// "properties": { -/// "aliases": { -/// "title": "Aliases", -/// "description": "Contains a list of alternate names for the same document.", -/// "type": "array", -/// "items": { -/// "title": "Alternate name", -/// "description": "Specifies a non-empty string that represents a distinct optional alternative ID used to refer to the document.", -/// "examples": [ -/// "CVE-2019-12345" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "current_release_date": { -/// "title": "Current release date", -/// "description": "The date when the current revision of this document was released", -/// "type": "string" -/// }, -/// "generator": { -/// "title": "Document generator", -/// "description": "Is a container to hold all elements related to the generation of the document. These items will reference when the document was actually created, including the date it was generated and the entity that generated it.", -/// "type": "object", -/// "required": [ -/// "engine" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of document generation", -/// "description": "This SHOULD be the current date that the document was generated. Because documents are often generated internally by a document producer and exist for a nonzero amount of time before being released, this field MAY be different from the Initial Release Date and Current Release Date.", -/// "type": "string" -/// }, -/// "engine": { -/// "title": "Engine of document generation", -/// "description": "Contains information about the engine that generated the CSAF document.", -/// "type": "object", -/// "required": [ -/// "name" -/// ], -/// "properties": { -/// "name": { -/// "title": "Engine name", -/// "description": "Represents the name of the engine that generated the CSAF document.", -/// "examples": [ -/// "Red Hat rhsa-to-cvrf", -/// "Secvisogram", -/// "TVCE" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "version": { -/// "title": "Engine version", -/// "description": "Contains the version of the engine that generated the CSAF document.", -/// "examples": [ -/// "0.6.0", -/// "1.0.0-beta+exp.sha.a1c44f85", -/// "2" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "id": { -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -/// }, -/// "initial_release_date": { -/// "title": "Initial release date", -/// "description": "The date when this document was first released to the specified target group.", -/// "type": "string" -/// }, -/// "revision_history": { -/// "title": "Revision history", -/// "description": "Holds one revision item for each version of the CSAF document, including the initial one.", -/// "type": "array", -/// "items": { -/// "title": "Revision", -/// "description": "Contains all the information elements required to track the evolution of a CSAF document.", -/// "type": "object", -/// "required": [ -/// "date", -/// "number", -/// "summary" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the revision", -/// "description": "The date of the revision entry", -/// "type": "string" -/// }, -/// "legacy_version": { -/// "title": "Legacy version of the revision", -/// "description": "Contains the version string used in an existing document with the same content.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "number": { -/// "$ref": "#/$defs/version_t" -/// }, -/// "summary": { -/// "title": "Summary of the revision", -/// "description": "Holds a single non-empty string representing a short description of the changes.", -/// "examples": [ -/// "Initial version." -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "status": { -/// "title": "Document status", -/// "description": "Defines the draft status of the document.", -/// "type": "string", -/// "enum": [ -/// "draft", -/// "final", -/// "interim" -/// ] -/// }, -/// "version": { -/// "$ref": "#/$defs/version_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Tracking { ///Contains a list of alternate names for the same document. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub aliases: ::std::option::Option<Vec<AlternateName>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub aliases: ::std::option::Option<::std::vec::Vec<AlternateName>>, ///The date when the current revision of this document was released pub current_release_date: ::std::string::String, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub generator: ::std::option::Option<DocumentGenerator>, ///The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority. pub id: UniqueIdentifierForTheDocument, @@ -10305,46 +4581,6 @@ impl Tracking { } } ///Provides details about the TLP classification of the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Traffic Light Protocol (TLP)", -/// "description": "Provides details about the TLP classification of the document.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "label": { -/// "title": "Label of TLP", -/// "description": "Provides the TLP label of the document.", -/// "default": "CLEAR", -/// "type": "string", -/// "enum": [ -/// "AMBER", -/// "AMBER+STRICT", -/// "CLEAR", -/// "GREEN", -/// "RED" -/// ] -/// }, -/// "url": { -/// "title": "URL of TLP version", -/// "description": "Provides a URL where to find the textual description of the TLP version which is used in this document. Default is the URL to the definition by FIRST.", -/// "default": "https://www.first.org/tlp/", -/// "examples": [ -/// "https://www.us-cert.gov/tlp", -/// "https://www.bsi.bund.de/SharedDocs/Downloads/DE/BSI/Kritis/Merkblatt_TLP.pdf" -/// ], -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct TrafficLightProtocolTlp { @@ -10360,24 +4596,6 @@ impl TrafficLightProtocolTlp { } } ///The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Unique identifier for the document", -/// "description": "The ID is a simple label that provides for a wide range of numbering values, types, and schemes. Its value SHOULD be assigned and maintained by the original document issuing authority.", -/// "examples": [ -/// "Example Company - 2019-YH3234", -/// "RHBA-2019:0024", -/// "cisco-sa-20190513-secureboot" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[\\S](.*[\\S])?$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct UniqueIdentifierForTheDocument(::std::string::String); @@ -10416,14 +4634,6 @@ impl ::std::convert::TryFrom<&str> for UniqueIdentifierForTheDocument { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for UniqueIdentifierForTheDocument { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for UniqueIdentifierForTheDocument { type Error = self::error::ConversionError; fn try_from( @@ -10445,24 +4655,6 @@ impl<'de> ::serde::Deserialize<'de> for UniqueIdentifierForTheDocument { } } ///Contains the cryptographic hash value in lowercase hexadecimal representation. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Value of the cryptographic hash", -/// "description": "Contains the cryptographic hash value in lowercase hexadecimal representation.", -/// "examples": [ -/// "37df33cb7464da5c7f077f4d56a32bc84987ec1d85b234537c1c1a4d4fc8d09dc29e2e762cb5203677bf849a2855a0283710f1f5fe1d6ce8d5ac85c645d0fcb3", -/// "4775203615d9534a8bfca96a93dc8b461a489f69124a130d786b42204f3341cc", -/// "9ea4c8200113d49d26505da0e02e2f49055dc078d1ad7a419b32e291c7afebbb84badfbd46dec42883bea0b2a1fa697c" -/// ], -/// "type": "string", -/// "minLength": 32, -/// "pattern": "^[0-9a-f]{32,}$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct ValueOfTheCryptographicHash(::std::string::String); @@ -10501,14 +4693,6 @@ impl ::std::convert::TryFrom<&str> for ValueOfTheCryptographicHash { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for ValueOfTheCryptographicHash { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for ValueOfTheCryptographicHash { type Error = self::error::ConversionError; fn try_from( @@ -10530,25 +4714,6 @@ impl<'de> ::serde::Deserialize<'de> for ValueOfTheCryptographicHash { } } ///Specifies a version string to denote clearly the evolution of the content of the document. Format must be either integer or semantic versioning. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Version", -/// "description": "Specifies a version string to denote clearly the evolution of the content of the document. Format must be either integer or semantic versioning.", -/// "examples": [ -/// "1", -/// "4", -/// "0.9.0", -/// "1.4.3", -/// "2.40.0+21AF26D3" -/// ], -/// "type": "string", -/// "pattern": "^(0|[1-9][0-9]*)$|^((0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?)$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct VersionT(::std::string::String); @@ -10592,14 +4757,6 @@ impl ::std::convert::TryFrom<&str> for VersionT { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for VersionT { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for VersionT { type Error = self::error::ConversionError; fn try_from( @@ -10621,648 +4778,48 @@ impl<'de> ::serde::Deserialize<'de> for VersionT { } } ///Is a container for the aggregation of all fields that are related to a single vulnerability in the document. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Vulnerability", -/// "description": "Is a container for the aggregation of all fields that are related to a single vulnerability in the document.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "acknowledgments": { -/// "title": "Vulnerability acknowledgments", -/// "description": "Contains a list of acknowledgment elements associated with this vulnerability item.", -/// "$ref": "#/$defs/acknowledgments_t" -/// }, -/// "cve": { -/// "title": "CVE", -/// "description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability.", -/// "type": "string", -/// "pattern": "^CVE-[0-9]{4}-[0-9]{4,}$" -/// }, -/// "cwes": { -/// "title": "List of CWEs", -/// "description": "Contains a list of CWEs.", -/// "type": "array", -/// "items": { -/// "title": "CWE", -/// "description": "Holds the MITRE standard Common Weakness Enumeration (CWE) for the weakness associated.", -/// "type": "object", -/// "required": [ -/// "id", -/// "name", -/// "version" -/// ], -/// "properties": { -/// "id": { -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -/// }, -/// "name": { -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -/// }, -/// "version": { -/// "title": "CWE version", -/// "description": "Holds the version string of the CWE specification this weakness was extracted from.", -/// "examples": [ -/// "1.0", -/// "3.4.1", -/// "4.0", -/// "4.11", -/// "4.12" -/// ], -/// "type": "string", -/// "pattern": "^[1-9]\\d*\\.([0-9]|([1-9]\\d+))(\\.\\d+)?$" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "disclosure_date": { -/// "title": "Disclosure date", -/// "description": "Holds the date and time the vulnerability was originally disclosed to the public.", -/// "type": "string" -/// }, -/// "discovery_date": { -/// "title": "Discovery date", -/// "description": "Holds the date and time the vulnerability was originally discovered.", -/// "type": "string" -/// }, -/// "first_known_exploitation_dates": { -/// "title": "List of first known exploitation dates", -/// "description": "Contains a list of dates of first known exploitations.", -/// "type": "array", -/// "items": { -/// "title": "First known exploitation date", -/// "description": "Contains information on when this vulnerability was first known to be exploited in the wild in the products specified.", -/// "type": "object", -/// "minProperties": 3, -/// "required": [ -/// "date", -/// "exploitation_date" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the information", -/// "description": "Contains the date when the information was last updated.", -/// "type": "string" -/// }, -/// "exploitation_date": { -/// "title": "Date of the exploitation", -/// "description": "Contains the date when the exploitation happened.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "flags": { -/// "title": "List of flags", -/// "description": "Contains a list of machine readable flags.", -/// "type": "array", -/// "items": { -/// "title": "Flag", -/// "description": "Contains product specific information in regard to this vulnerability as a single machine readable flag.", -/// "type": "object", -/// "required": [ -/// "label" -/// ], -/// "properties": { -/// "date": { -/// "title": "Date of the flag", -/// "description": "Contains the date when assessment was done or the flag was assigned.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "label": { -/// "title": "Label of the flag", -/// "description": "Specifies the machine readable label.", -/// "type": "string", -/// "enum": [ -/// "component_not_present", -/// "inline_mitigations_already_exist", -/// "vulnerable_code_cannot_be_controlled_by_adversary", -/// "vulnerable_code_not_in_execute_path", -/// "vulnerable_code_not_present" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "ids": { -/// "title": "List of IDs", -/// "description": "Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists).", -/// "type": "array", -/// "items": { -/// "title": "ID", -/// "description": "Contains a single unique label or tracking ID for the vulnerability.", -/// "type": "object", -/// "required": [ -/// "system_name", -/// "text" -/// ], -/// "properties": { -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "system_name": { -/// "title": "System name", -/// "description": "Indicates the name of the vulnerability tracking or numbering system.", -/// "examples": [ -/// "Cisco Bug ID", -/// "GitHub Issue", -/// "https://github.com/oasis-tcs/csaf" -/// ], -/// "type": "string", -/// "minLength": 1 -/// }, -/// "text": { -/// "title": "Text", -/// "description": "Is unique label or tracking ID for the vulnerability (if such information exists).", -/// "examples": [ -/// "CSCso66472", -/// "oasis-tcs/csaf#210", -/// "#1217" -/// ], -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "involvements": { -/// "title": "List of involvements", -/// "description": "Contains a list of involvements.", -/// "type": "array", -/// "items": { -/// "title": "Involvement", -/// "description": "Is a container, that allows the document producers to comment on the level of involvement (or engagement) of themselves or third parties in the vulnerability identification, scoping, and remediation process.", -/// "type": "object", -/// "required": [ -/// "party", -/// "status" -/// ], -/// "properties": { -/// "contact": { -/// "title": "Party contact information", -/// "description": "Contains the contact information of the party that was used in this state.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "date": { -/// "title": "Date of involvement", -/// "description": "Holds the date and time of the involvement entry.", -/// "type": "string" -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "party": { -/// "title": "Party category", -/// "description": "Defines the category of the involved party.", -/// "type": "string", -/// "enum": [ -/// "coordinator", -/// "discoverer", -/// "other", -/// "user", -/// "vendor" -/// ] -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "status": { -/// "title": "Party status", -/// "description": "Defines contact status of the involved party.", -/// "type": "string", -/// "enum": [ -/// "completed", -/// "contact_attempted", -/// "disputed", -/// "in_progress", -/// "not_contacted", -/// "open" -/// ] -/// }, -/// "summary": { -/// "title": "Summary of the involvement", -/// "description": "Contains additional context regarding what is going on.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "metrics": { -/// "title": "List of metrics", -/// "description": "Contains metric objects for the current vulnerability.", -/// "type": "array", -/// "items": { -/// "title": "metric", -/// "description": "Contains all metadata about the metric including products it applies to and the source and the content itself.", -/// "type": "object", -/// "required": [ -/// "content", -/// "products" -/// ], -/// "properties": { -/// "content": { -/// "title": "Content", -/// "description": "Specifies information about (at least one) metric or score for the given products regarding the current vulnerability.", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "cvss_v2": { -/// "type": "object" -/// }, -/// "cvss_v3": { -/// "type": "object" -/// }, -/// "cvss_v4": { -/// "type": "object" -/// }, -/// "epss": { -/// "title": "EPSS", -/// "description": "Contains the EPSS data.", -/// "type": "object", -/// "required": [ -/// "percentile", -/// "probability", -/// "timestamp" -/// ], -/// "properties": { -/// "percentile": { -/// "title": "Percentile", -/// "description": "Contains the rank ordering of probabilities from highest to lowest.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "probability": { -/// "title": "Probability", -/// "description": "Contains the likelihood that any exploitation activity for this Vulnerability is being observed in the 30 days following the given timestamp.", -/// "type": "string", -/// "pattern": "^(([0]\\.([0-9])+)|([1]\\.[0]+))$" -/// }, -/// "timestamp": { -/// "title": "EPSS timestamp", -/// "description": "Holds the date and time the EPSS value was recorded.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "qualitative_severity_rating": { -/// "title": "Qualitative Severity Rating", -/// "description": "Contains an assessment of the severity of the vulnerability regarding the products on a qualitative scale.", -/// "type": "string", -/// "enum": [ -/// "critical", -/// "high", -/// "low", -/// "medium", -/// "none" -/// ] -/// }, -/// "ssvc_v1": { -/// "type": "object" -/// }, -/// "ssvc_v2": { -/// "type": "object" -/// }, -/// "x_extensions": { -/// "title": "Metrics-content-level Extensions", -/// "description": "Contains a list of extensions valid at the metrics-content-level of the CSAF document and associated with this metric element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "products": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "source": { -/// "title": "Source", -/// "description": "Contains the URL of the source that originally determined the metric.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "notes": { -/// "title": "Vulnerability notes", -/// "description": "Holds notes associated with this vulnerability item.", -/// "$ref": "#/$defs/notes_t" -/// }, -/// "product_status": { -/// "title": "Product status", -/// "description": "Contains different lists of product_ids which provide details on the status of the referenced product related to the current vulnerability. ", -/// "type": "object", -/// "minProperties": 1, -/// "properties": { -/// "first_affected": { -/// "title": "First affected", -/// "description": "These are the first versions of the releases known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "first_fixed": { -/// "title": "First fixed", -/// "description": "These versions contain the first fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "fixed": { -/// "title": "Fixed", -/// "description": "These versions contain a fix for the vulnerability but may not be the recommended fixed versions.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_affected": { -/// "title": "Known affected", -/// "description": "These versions are known to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "known_not_affected": { -/// "title": "Known not affected", -/// "description": "These versions are known not to be affected by the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "last_affected": { -/// "title": "Last affected", -/// "description": "These are the last versions in a release train known to be affected by the vulnerability. Subsequently released versions would contain a fix for the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "recommended": { -/// "title": "Recommended", -/// "description": "These versions have a fix for the vulnerability and are the vendor-recommended versions for fixing the vulnerability.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "under_investigation": { -/// "title": "Under investigation", -/// "description": "It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation - the result will be provided in a later release of the document.", -/// "$ref": "#/$defs/products_t" -/// }, -/// "unknown": { -/// "title": "Unknown", -/// "description": "It is not known whether these versions are or are not affected by the vulnerability. There is also no investigation and therefore the status might never be determined.", -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "references": { -/// "title": "Vulnerability references", -/// "description": "Holds a list of references associated with this vulnerability item.", -/// "$ref": "#/$defs/references_t" -/// }, -/// "remediations": { -/// "title": "List of remediations", -/// "description": "Contains a list of remediations.", -/// "type": "array", -/// "items": { -/// "title": "Remediation", -/// "description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the remediation", -/// "description": "Specifies the category which this remediation belongs to.", -/// "type": "string", -/// "enum": [ -/// "fix_planned", -/// "mitigation", -/// "no_fix_planned", -/// "none_available", -/// "optional_patch", -/// "vendor_fix", -/// "workaround" -/// ] -/// }, -/// "date": { -/// "title": "Date of the remediation", -/// "description": "Contains the date from which the remediation is available.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the remediation", -/// "description": "Contains a thorough human-readable discussion of the remediation.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "entitlements": { -/// "title": "List of entitlements", -/// "description": "Contains a list of entitlements.", -/// "type": "array", -/// "items": { -/// "title": "Entitlement of the remediation", -/// "description": "Contains any possible vendor-defined constraints for obtaining fixed software or hardware that fully resolves the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "minItems": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// }, -/// "restart_required": { -/// "title": "Restart required by remediation", -/// "description": "Provides information on the category of restart required by this remediation to become effective.", -/// "type": "object", -/// "required": [ -/// "category" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of restart", -/// "description": "Specifies what category of restart is required by this remediation to become effective.", -/// "type": "string", -/// "enum": [ -/// "connected", -/// "dependencies", -/// "machine", -/// "none", -/// "parent", -/// "service", -/// "system", -/// "vulnerable_component", -/// "zone" -/// ] -/// }, -/// "details": { -/// "title": "Additional restart information", -/// "description": "Provides additional information for the restart. This can include details on procedures, scope or impact.", -/// "type": "string", -/// "minLength": 1 -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "url": { -/// "title": "URL to the remediation", -/// "description": "Contains the URL where to obtain the remediation.", -/// "type": "string" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "threats": { -/// "title": "List of threats", -/// "description": "Contains information about a vulnerability that can change with time.", -/// "type": "array", -/// "items": { -/// "title": "Threat", -/// "description": "Contains the vulnerability kinetic information. This information can change as the vulnerability ages and new information becomes available.", -/// "type": "object", -/// "required": [ -/// "category", -/// "details" -/// ], -/// "properties": { -/// "category": { -/// "title": "Category of the threat", -/// "description": "Categorizes the threat according to the rules of the specification.", -/// "type": "string", -/// "enum": [ -/// "exploit_status", -/// "impact", -/// "target_set" -/// ] -/// }, -/// "date": { -/// "title": "Date of the threat", -/// "description": "Contains the date when the assessment was done or the threat appeared.", -/// "type": "string" -/// }, -/// "details": { -/// "title": "Details of the threat", -/// "description": "Represents a thorough human-readable discussion of the threat.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "group_ids": { -/// "$ref": "#/$defs/product_groups_t" -/// }, -/// "product_ids": { -/// "$ref": "#/$defs/products_t" -/// } -/// }, -/// "additionalProperties": false -/// }, -/// "minItems": 1 -/// }, -/// "title": { -/// "title": "Title", -/// "description": "Gives the document producer the ability to apply a canonical name or title to the vulnerability.", -/// "type": "string", -/// "minLength": 1 -/// }, -/// "x_extensions": { -/// "title": "Vulnerability-level Extensions", -/// "description": "Contains a list of extensions valid at the vulnerability item level of the CSAF document and associated with this vulnerability element.", -/// "$ref": "#/$defs/extensions_t" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> -#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] +#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Default, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct Vulnerability { ///Contains a list of acknowledgment elements associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub acknowledgments: ::std::option::Option<AcknowledgmentsT>, ///Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub cve: ::std::option::Option<Cve>, ///Contains a list of CWEs. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub cwes: ::std::option::Option<Vec<Cwe>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub cwes: ::std::option::Option<::std::vec::Vec<Cwe>>, ///Holds the date and time the vulnerability was originally disclosed to the public. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub disclosure_date: ::std::option::Option<::std::string::String>, ///Holds the date and time the vulnerability was originally discovered. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub discovery_date: ::std::option::Option<::std::string::String>, ///Contains a list of dates of first known exploitations. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub first_known_exploitation_dates: ::std::option::Option< - Vec<FirstKnownExploitationDate>, + ::std::vec::Vec<FirstKnownExploitationDate>, >, ///Contains a list of machine readable flags. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub flags: ::std::option::Option<Vec<Flag>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub flags: ::std::option::Option<::std::vec::Vec<Flag>>, ///Represents a list of unique labels or tracking IDs for the vulnerability (if such information exists). - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub ids: ::std::option::Option<Vec<Id>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub ids: ::std::option::Option<::std::vec::Vec<Id>>, ///Contains a list of involvements. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub involvements: ::std::option::Option<Vec<Involvement>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub involvements: ::std::option::Option<::std::vec::Vec<Involvement>>, ///Contains metric objects for the current vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub metrics: ::std::option::Option<Vec<Metric>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub metrics: ::std::option::Option<::std::vec::Vec<Metric>>, ///Holds notes associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub notes: ::std::option::Option<NotesT>, - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub product_status: ::std::option::Option<ProductStatus>, ///Holds a list of references associated with this vulnerability item. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub references: ::std::option::Option<ReferencesT>, ///Contains a list of remediations. #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] @@ -11271,58 +4828,18 @@ pub struct Vulnerability { #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")] pub threats: ::std::vec::Vec<Threat>, ///Gives the document producer the ability to apply a canonical name or title to the vulnerability. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub title: ::std::option::Option<Title>, ///Contains a list of extensions valid at the vulnerability item level of the CSAF document and associated with this vulnerability element. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub x_extensions: ::std::option::Option<ExtensionsT>, } -impl ::std::default::Default for Vulnerability { - fn default() -> Self { - Self { - acknowledgments: Default::default(), - cve: Default::default(), - cwes: Default::default(), - disclosure_date: Default::default(), - discovery_date: Default::default(), - first_known_exploitation_dates: Default::default(), - flags: Default::default(), - ids: Default::default(), - involvements: Default::default(), - metrics: Default::default(), - notes: Default::default(), - product_status: Default::default(), - references: Default::default(), - remediations: Default::default(), - threats: Default::default(), - title: Default::default(), - x_extensions: Default::default(), - } - } -} impl Vulnerability { pub fn builder() -> builder::Vulnerability { Default::default() } } ///Holds the ID for the weakness associated. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Weakness ID", -/// "description": "Holds the ID for the weakness associated.", -/// "examples": [ -/// "CWE-22", -/// "CWE-352", -/// "CWE-79" -/// ], -/// "type": "string", -/// "pattern": "^CWE-[1-9]\\d{0,5}$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct WeaknessId(::std::string::String); @@ -11358,14 +4875,6 @@ impl ::std::convert::TryFrom<&str> for WeaknessId { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for WeaknessId { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for WeaknessId { type Error = self::error::ConversionError; fn try_from( @@ -11387,24 +4896,6 @@ impl<'de> ::serde::Deserialize<'de> for WeaknessId { } } ///Holds the full name of the weakness as given in the CWE specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Weakness name", -/// "description": "Holds the full name of the weakness as given in the CWE specification.", -/// "examples": [ -/// "Cross-Site Request Forgery (CSRF)", -/// "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", -/// "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')" -/// ], -/// "type": "string", -/// "minLength": 1, -/// "pattern": "^[^\\s\\-_\\.](.*[^\\s\\-_\\.])?$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct WeaknessName(::std::string::String); @@ -11445,14 +4936,6 @@ impl ::std::convert::TryFrom<&str> for WeaknessName { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for WeaknessName { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for WeaknessName { type Error = self::error::ConversionError; fn try_from( @@ -12046,7 +5529,10 @@ pub mod builder { } #[derive(Clone, Debug)] pub struct CryptographicHashes { - file_hashes: ::std::result::Result<Vec<super::FileHash>, ::std::string::String>, + file_hashes: ::std::result::Result< + ::std::vec::Vec<super::FileHash>, + ::std::string::String, + >, filename: ::std::result::Result<super::Filename, ::std::string::String>, } impl ::std::default::Default for CryptographicHashes { @@ -12060,7 +5546,7 @@ pub mod builder { impl CryptographicHashes { pub fn file_hashes<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::FileHash>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::FileHash>>, T::Error: ::std::fmt::Display, { self.file_hashes = value @@ -13065,31 +6551,31 @@ pub mod builder { ::std::string::String, >, hashes: ::std::result::Result< - ::std::option::Option<Vec<super::CryptographicHashes>>, + ::std::option::Option<::std::vec::Vec<super::CryptographicHashes>>, ::std::string::String, >, model_numbers: ::std::result::Result< - ::std::option::Option<Vec<super::ModelNumber>>, + ::std::option::Option<::std::vec::Vec<super::ModelNumber>>, ::std::string::String, >, purls: ::std::result::Result< - ::std::option::Option<Vec<super::PackageUrlRepresentation>>, + ::std::option::Option<::std::vec::Vec<super::PackageUrlRepresentation>>, ::std::string::String, >, sbom_urls: ::std::result::Result< - ::std::option::Option<Vec<::std::string::String>>, + ::std::option::Option<::std::vec::Vec<::std::string::String>>, ::std::string::String, >, serial_numbers: ::std::result::Result< - ::std::option::Option<Vec<super::SerialNumber>>, + ::std::option::Option<::std::vec::Vec<super::SerialNumber>>, ::std::string::String, >, skus: ::std::result::Result< - ::std::option::Option<Vec<super::StockKeepingUnit>>, + ::std::option::Option<::std::vec::Vec<super::StockKeepingUnit>>, ::std::string::String, >, x_generic_uris: ::std::result::Result< - ::std::option::Option<Vec<super::GenericUri>>, + ::std::option::Option<::std::vec::Vec<super::GenericUri>>, ::std::string::String, >, } @@ -13123,7 +6609,7 @@ pub mod builder { pub fn hashes<T>(mut self, value: T) -> Self where T: ::std::convert::TryInto< - ::std::option::Option<Vec<super::CryptographicHashes>>, + ::std::option::Option<::std::vec::Vec<super::CryptographicHashes>>, >, T::Error: ::std::fmt::Display, { @@ -13134,7 +6620,9 @@ pub mod builder { } pub fn model_numbers<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::ModelNumber>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::ModelNumber>>, + >, T::Error: ::std::fmt::Display, { self.model_numbers = value @@ -13147,7 +6635,7 @@ pub mod builder { pub fn purls<T>(mut self, value: T) -> Self where T: ::std::convert::TryInto< - ::std::option::Option<Vec<super::PackageUrlRepresentation>>, + ::std::option::Option<::std::vec::Vec<super::PackageUrlRepresentation>>, >, T::Error: ::std::fmt::Display, { @@ -13159,7 +6647,7 @@ pub mod builder { pub fn sbom_urls<T>(mut self, value: T) -> Self where T: ::std::convert::TryInto< - ::std::option::Option<Vec<::std::string::String>>, + ::std::option::Option<::std::vec::Vec<::std::string::String>>, >, T::Error: ::std::fmt::Display, { @@ -13172,7 +6660,9 @@ pub mod builder { } pub fn serial_numbers<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::SerialNumber>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::SerialNumber>>, + >, T::Error: ::std::fmt::Display, { self.serial_numbers = value @@ -13185,7 +6675,7 @@ pub mod builder { pub fn skus<T>(mut self, value: T) -> Self where T: ::std::convert::TryInto< - ::std::option::Option<Vec<super::StockKeepingUnit>>, + ::std::option::Option<::std::vec::Vec<super::StockKeepingUnit>>, >, T::Error: ::std::fmt::Display, { @@ -13196,7 +6686,9 @@ pub mod builder { } pub fn x_generic_uris<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::GenericUri>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::GenericUri>>, + >, T::Error: ::std::fmt::Display, { self.x_generic_uris = value @@ -13694,7 +7186,7 @@ pub mod builder { pub struct ProductGroup { group_id: ::std::result::Result<super::ProductGroupIdT, ::std::string::String>, product_ids: ::std::result::Result< - Vec<super::ProductIdT>, + ::std::vec::Vec<super::ProductIdT>, ::std::string::String, >, summary: ::std::result::Result< @@ -13726,7 +7218,7 @@ pub mod builder { } pub fn product_ids<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::ProductIdT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::ProductIdT>>, T::Error: ::std::fmt::Display, { self.product_ids = value @@ -15017,7 +8509,7 @@ pub mod builder { #[derive(Clone, Debug)] pub struct Tracking { aliases: ::std::result::Result< - ::std::option::Option<Vec<super::AlternateName>>, + ::std::option::Option<::std::vec::Vec<super::AlternateName>>, ::std::string::String, >, current_release_date: ::std::result::Result< @@ -15066,7 +8558,9 @@ pub mod builder { impl Tracking { pub fn aliases<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::AlternateName>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::AlternateName>>, + >, T::Error: ::std::fmt::Display, { self.aliases = value @@ -15259,7 +8753,7 @@ pub mod builder { ::std::string::String, >, cwes: ::std::result::Result< - ::std::option::Option<Vec<super::Cwe>>, + ::std::option::Option<::std::vec::Vec<super::Cwe>>, ::std::string::String, >, disclosure_date: ::std::result::Result< @@ -15271,23 +8765,23 @@ pub mod builder { ::std::string::String, >, first_known_exploitation_dates: ::std::result::Result< - ::std::option::Option<Vec<super::FirstKnownExploitationDate>>, + ::std::option::Option<::std::vec::Vec<super::FirstKnownExploitationDate>>, ::std::string::String, >, flags: ::std::result::Result< - ::std::option::Option<Vec<super::Flag>>, + ::std::option::Option<::std::vec::Vec<super::Flag>>, ::std::string::String, >, ids: ::std::result::Result< - ::std::option::Option<Vec<super::Id>>, + ::std::option::Option<::std::vec::Vec<super::Id>>, ::std::string::String, >, involvements: ::std::result::Result< - ::std::option::Option<Vec<super::Involvement>>, + ::std::option::Option<::std::vec::Vec<super::Involvement>>, ::std::string::String, >, metrics: ::std::result::Result< - ::std::option::Option<Vec<super::Metric>>, + ::std::option::Option<::std::vec::Vec<super::Metric>>, ::std::string::String, >, notes: ::std::result::Result< @@ -15367,7 +8861,9 @@ pub mod builder { } pub fn cwes<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Cwe>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Cwe>>, + >, T::Error: ::std::fmt::Display, { self.cwes = value @@ -15402,7 +8898,7 @@ pub mod builder { pub fn first_known_exploitation_dates<T>(mut self, value: T) -> Self where T: ::std::convert::TryInto< - ::std::option::Option<Vec<super::FirstKnownExploitationDate>>, + ::std::option::Option<::std::vec::Vec<super::FirstKnownExploitationDate>>, >, T::Error: ::std::fmt::Display, { @@ -15417,7 +8913,9 @@ pub mod builder { } pub fn flags<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Flag>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Flag>>, + >, T::Error: ::std::fmt::Display, { self.flags = value @@ -15427,7 +8925,9 @@ pub mod builder { } pub fn ids<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Id>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Id>>, + >, T::Error: ::std::fmt::Display, { self.ids = value @@ -15437,7 +8937,9 @@ pub mod builder { } pub fn involvements<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Involvement>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Involvement>>, + >, T::Error: ::std::fmt::Display, { self.involvements = value @@ -15449,7 +8951,9 @@ pub mod builder { } pub fn metrics<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::Metric>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::Metric>>, + >, T::Error: ::std::fmt::Display, { self.metrics = value @@ -15599,6 +9103,38 @@ pub mod defaults { "https://www.first.org/tlp/".to_string() } } +/// Error types. +pub mod error { + /// Error from a `TryFrom` or `FromStr` implementation. + pub struct ConversionError(::std::borrow::Cow<'static, str>); + impl ::std::error::Error for ConversionError {} + impl ::std::fmt::Display for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Display::fmt(&self.0, f) + } + } + impl ::std::fmt::Debug for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Debug::fmt(&self.0, f) + } + } + impl From<&'static str> for ConversionError { + fn from(value: &'static str) -> Self { + Self(value.into()) + } + } + impl From<String> for ConversionError { + fn from(value: String) -> Self { + Self(value.into()) + } + } +} crate::macros::impl_string_newtype_ergonomics!(AdditionalRestartInformation); crate::macros::impl_string_newtype_ergonomics!(AlgorithmOfTheCryptographicHash); crate::macros::impl_string_newtype_ergonomics!(AlternateName); diff --git a/csaf-rs/src/schema/csaf2_1/testcases_schema.rs b/csaf-rs/src/schema/csaf2_1/testcases_schema.rs index a2561f55..c09a7423 100644 --- a/csaf-rs/src/schema/csaf2_1/testcases_schema.rs +++ b/csaf-rs/src/schema/csaf2_1/testcases_schema.rs @@ -6,81 +6,14 @@ #![allow(clippy::all)] #![cfg_attr(any(), rustfmt::skip)] #![allow(rustdoc::all)] -/// Error types. -pub mod error { - /// Error from a `TryFrom` or `FromStr` implementation. - pub struct ConversionError(::std::borrow::Cow<'static, str>); - impl ::std::error::Error for ConversionError {} - impl ::std::fmt::Display for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Display::fmt(&self.0, f) - } - } - impl ::std::fmt::Debug for ConversionError { - fn fmt( - &self, - f: &mut ::std::fmt::Formatter<'_>, - ) -> Result<(), ::std::fmt::Error> { - ::std::fmt::Debug::fmt(&self.0, f) - } - } - impl From<&'static str> for ConversionError { - fn from(value: &'static str) -> Self { - Self(value.into()) - } - } - impl From<String> for ConversionError { - fn from(value: String) -> Self { - Self(value.into()) - } - } -} ///Contains information about a single test file. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "File information", -/// "description": "Contains information about a single test file.", -/// "type": "object", -/// "required": [ -/// "name", -/// "valid" -/// ], -/// "properties": { -/// "name": { -/// "title": "Name of the test file", -/// "description": "Contains the filename and path relative to the JSON that details the testcase.", -/// "type": "string", -/// "pattern": "^.+\\.json$" -/// }, -/// "result": { -/// "title": "Name of the result file", -/// "description": "Contains the filename and path relative to the JSON that details the expected result.", -/// "type": "string", -/// "pattern": "^.+\\.result\\.json$" -/// }, -/// "valid": { -/// "title": "Evaluation result", -/// "description": "States whether the test file is valid according to the CSAF standard.", -/// "type": "boolean" -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct FileT { ///Contains the filename and path relative to the JSON that details the testcase. pub name: NameOfTheTestFile, ///Contains the filename and path relative to the JSON that details the expected result. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] + #[serde(skip_serializing_if = "::std::option::Option::is_none")] pub result: ::std::option::Option<NameOfTheResultFile>, ///States whether the test file is valid according to the CSAF standard. pub valid: bool, @@ -91,21 +24,6 @@ impl FileT { } } ///Contains the URL of the JSON schema for test data which the document promises to be valid for. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "JSON schema", -/// "description": "Contains the URL of the JSON schema for test data which the document promises to be valid for.", -/// "type": "string", -/// "format": "uri", -/// "enum": [ -/// "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.1/test/validator/testcases_json_schema.json" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -158,14 +76,6 @@ impl ::std::convert::TryFrom<&str> for JsonSchema { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for JsonSchema { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { type Error = self::error::ConversionError; fn try_from( @@ -175,18 +85,6 @@ impl ::std::convert::TryFrom<::std::string::String> for JsonSchema { } } ///Contains the filename and path relative to the JSON that details the expected result. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of the result file", -/// "description": "Contains the filename and path relative to the JSON that details the expected result.", -/// "type": "string", -/// "pattern": "^.+\\.result\\.json$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheResultFile(::std::string::String); @@ -222,14 +120,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheResultFile { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheResultFile { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheResultFile { type Error = self::error::ConversionError; fn try_from( @@ -251,18 +141,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheResultFile { } } ///Contains the filename and path relative to the JSON that details the testcase. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Name of the test file", -/// "description": "Contains the filename and path relative to the JSON that details the testcase.", -/// "type": "string", -/// "pattern": "^.+\\.json$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NameOfTheTestFile(::std::string::String); @@ -298,14 +176,6 @@ impl ::std::convert::TryFrom<&str> for NameOfTheTestFile { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NameOfTheTestFile { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NameOfTheTestFile { type Error = self::error::ConversionError; fn try_from( @@ -327,18 +197,6 @@ impl<'de> ::serde::Deserialize<'de> for NameOfTheTestFile { } } ///Contains the section number of the test in the specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Number of the test", -/// "description": "Contains the section number of the test in the specification.", -/// "type": "string", -/// "pattern": "^6\\.(([1-3]\\.[1-9])|(1\\.10)|([12]\\.1[1-9])|(3\\.1[0-8])|(3\\.19\\.[1-5])|([12]\\.2[0-6])|(2\\.27)|([12]\\.2[8-9])|(1\\.27\\.([1-9]|1[0-9]))|(3\\.2[02])|(3\\.21\\.[1-9])|([12]\\.3[0-8])|(1\\.39)|(2\\.39\\.[1-5])|([12]\\.4[0-9])|(1\\.5[0-9])|(2\\.50\\.[1-3])|(2\\.5[1-3])|(2\\.54\\.[1-4])|(1\\.60\\.[1-3])|(1\\.6[1]))$" -///} -/// ``` -/// </details> #[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] #[serde(transparent)] pub struct NumberOfTheTest(::std::string::String); @@ -382,14 +240,6 @@ impl ::std::convert::TryFrom<&str> for NumberOfTheTest { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for NumberOfTheTest { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for NumberOfTheTest { type Error = self::error::ConversionError; fn try_from( @@ -411,53 +261,6 @@ impl<'de> ::serde::Deserialize<'de> for NumberOfTheTest { } } ///Representation of the data provided for test cases from section 6 of the specification. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "$id": "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.1/test/validator/testcases_json_schema.json", -/// "title": "Test cases for CSAF", -/// "description": "Representation of the data provided for test cases from section 6 of the specification.", -/// "type": "object", -/// "required": [ -/// "$schema", -/// "tests", -/// "testschema_version" -/// ], -/// "properties": { -/// "$schema": { -/// "title": "JSON schema", -/// "description": "Contains the URL of the JSON schema for test data which the document promises to be valid for.", -/// "type": "string", -/// "format": "uri", -/// "enum": [ -/// "https://raw.githubusercontent.com/oasis-tcs/csaf/master/csaf_2.1/test/validator/testcases_json_schema.json" -/// ] -/// }, -/// "tests": { -/// "title": "List of tests", -/// "description": "Contains a list of test data.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/test_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "testschema_version": { -/// "title": "Test schema version", -/// "description": "Contains the current version of this schema", -/// "type": "string", -/// "enum": [ -/// "2.1" -/// ] -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct TestCasesForCsaf { @@ -465,7 +268,7 @@ pub struct TestCasesForCsaf { #[serde(rename = "$schema")] pub schema: JsonSchema, ///Contains a list of test data. - pub tests: Vec<TestT>, + pub tests: ::std::vec::Vec<TestT>, ///Contains the current version of this schema pub testschema_version: TestSchemaVersion, } @@ -475,22 +278,6 @@ impl TestCasesForCsaf { } } ///Contains the name of the group the test belongs to. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test group", -/// "description": "Contains the name of the group the test belongs to.", -/// "type": "string", -/// "enum": [ -/// "informative", -/// "mandatory", -/// "recommended" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -541,14 +328,6 @@ impl ::std::convert::TryFrom<&str> for TestGroup { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TestGroup { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TestGroup { type Error = self::error::ConversionError; fn try_from( @@ -558,20 +337,6 @@ impl ::std::convert::TryFrom<::std::string::String> for TestGroup { } } ///Contains the current version of this schema -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test schema version", -/// "description": "Contains the current version of this schema", -/// "type": "string", -/// "enum": [ -/// "2.1" -/// ] -///} -/// ``` -/// </details> #[derive( ::serde::Deserialize, ::serde::Serialize, @@ -614,14 +379,6 @@ impl ::std::convert::TryFrom<&str> for TestSchemaVersion { value.parse() } } -impl ::std::convert::TryFrom<&::std::string::String> for TestSchemaVersion { - type Error = self::error::ConversionError; - fn try_from( - value: &::std::string::String, - ) -> ::std::result::Result<Self, self::error::ConversionError> { - value.parse() - } -} impl ::std::convert::TryFrom<::std::string::String> for TestSchemaVersion { type Error = self::error::ConversionError; fn try_from( @@ -631,73 +388,18 @@ impl ::std::convert::TryFrom<::std::string::String> for TestSchemaVersion { } } ///Contains test data for a single test. -/// -/// <details><summary>JSON schema</summary> -/// -/// ```json -///{ -/// "title": "Test", -/// "description": "Contains test data for a single test.", -/// "type": "object", -/// "required": [ -/// "failures", -/// "group", -/// "id" -/// ], -/// "properties": { -/// "failures": { -/// "title": "List of failing examples", -/// "description": "Contains a list of files of examples that fail that specific test.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/file_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// }, -/// "group": { -/// "title": "Test group", -/// "description": "Contains the name of the group the test belongs to.", -/// "type": "string", -/// "enum": [ -/// "informative", -/// "mandatory", -/// "recommended" -/// ] -/// }, -/// "id": { -/// "title": "Number of the test", -/// "description": "Contains the section number of the test in the specification.", -/// "type": "string", -/// "pattern": "^6\\.(([1-3]\\.[1-9])|(1\\.10)|([12]\\.1[1-9])|(3\\.1[0-8])|(3\\.19\\.[1-5])|([12]\\.2[0-6])|(2\\.27)|([12]\\.2[8-9])|(1\\.27\\.([1-9]|1[0-9]))|(3\\.2[02])|(3\\.21\\.[1-9])|([12]\\.3[0-8])|(1\\.39)|(2\\.39\\.[1-5])|([12]\\.4[0-9])|(1\\.5[0-9])|(2\\.50\\.[1-3])|(2\\.5[1-3])|(2\\.54\\.[1-4])|(1\\.60\\.[1-3])|(1\\.6[1]))$" -/// }, -/// "valid": { -/// "title": "List of valid examples", -/// "description": "Contains a list of files of examples that pass that specific test.", -/// "type": "array", -/// "items": { -/// "$ref": "#/$defs/file_t" -/// }, -/// "minItems": 1, -/// "uniqueItems": true -/// } -/// }, -/// "additionalProperties": false -///} -/// ``` -/// </details> #[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug, Eq, PartialEq)] #[serde(deny_unknown_fields)] pub struct TestT { ///Contains a list of files of examples that fail that specific test. - pub failures: Vec<FileT>, + pub failures: ::std::vec::Vec<FileT>, ///Contains the name of the group the test belongs to. pub group: TestGroup, ///Contains the section number of the test in the specification. pub id: NumberOfTheTest, ///Contains a list of files of examples that pass that specific test. - #[serde(default, skip_serializing_if = "::std::option::Option::is_none")] - pub valid: ::std::option::Option<Vec<FileT>>, + #[serde(skip_serializing_if = "::std::option::Option::is_none")] + pub valid: ::std::option::Option<::std::vec::Vec<FileT>>, } impl TestT { pub fn builder() -> builder::TestT { @@ -782,7 +484,10 @@ pub mod builder { #[derive(Clone, Debug)] pub struct TestCasesForCsaf { schema: ::std::result::Result<super::JsonSchema, ::std::string::String>, - tests: ::std::result::Result<Vec<super::TestT>, ::std::string::String>, + tests: ::std::result::Result< + ::std::vec::Vec<super::TestT>, + ::std::string::String, + >, testschema_version: ::std::result::Result< super::TestSchemaVersion, ::std::string::String, @@ -812,7 +517,7 @@ pub mod builder { } pub fn tests<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::TestT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::TestT>>, T::Error: ::std::fmt::Display, { self.tests = value @@ -858,11 +563,14 @@ pub mod builder { } #[derive(Clone, Debug)] pub struct TestT { - failures: ::std::result::Result<Vec<super::FileT>, ::std::string::String>, + failures: ::std::result::Result< + ::std::vec::Vec<super::FileT>, + ::std::string::String, + >, group: ::std::result::Result<super::TestGroup, ::std::string::String>, id: ::std::result::Result<super::NumberOfTheTest, ::std::string::String>, valid: ::std::result::Result< - ::std::option::Option<Vec<super::FileT>>, + ::std::option::Option<::std::vec::Vec<super::FileT>>, ::std::string::String, >, } @@ -879,7 +587,7 @@ pub mod builder { impl TestT { pub fn failures<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<Vec<super::FileT>>, + T: ::std::convert::TryInto<::std::vec::Vec<super::FileT>>, T::Error: ::std::fmt::Display, { self.failures = value @@ -911,7 +619,9 @@ pub mod builder { } pub fn valid<T>(mut self, value: T) -> Self where - T: ::std::convert::TryInto<::std::option::Option<Vec<super::FileT>>>, + T: ::std::convert::TryInto< + ::std::option::Option<::std::vec::Vec<super::FileT>>, + >, T::Error: ::std::fmt::Display, { self.valid = value @@ -944,6 +654,38 @@ pub mod builder { } } } +/// Error types. +pub mod error { + /// Error from a `TryFrom` or `FromStr` implementation. + pub struct ConversionError(::std::borrow::Cow<'static, str>); + impl ::std::error::Error for ConversionError {} + impl ::std::fmt::Display for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Display::fmt(&self.0, f) + } + } + impl ::std::fmt::Debug for ConversionError { + fn fmt( + &self, + f: &mut ::std::fmt::Formatter<'_>, + ) -> Result<(), ::std::fmt::Error> { + ::std::fmt::Debug::fmt(&self.0, f) + } + } + impl From<&'static str> for ConversionError { + fn from(value: &'static str) -> Self { + Self(value.into()) + } + } + impl From<String> for ConversionError { + fn from(value: String) -> Self { + Self(value.into()) + } + } +} crate::macros::impl_string_newtype_ergonomics!(NameOfTheResultFile); crate::macros::impl_string_newtype_ergonomics!(NameOfTheTestFile); crate::macros::impl_string_newtype_ergonomics!(NumberOfTheTest);