pub struct Builder { /* private fields */ }
Expand description

A builder for Vulnerability.

Implementations§

The identifier of the vulnerability.

The identifier of the vulnerability.

Examples found in repository?
src/json_deser.rs (lines 7686-7692)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to vulnerable_packages.

To override the contents of this collection use set_vulnerable_packages.

List of software packages that have the vulnerability.

List of software packages that have the vulnerability.

Examples found in repository?
src/json_deser.rs (lines 7695-7697)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to cvss.

To override the contents of this collection use set_cvss.

CVSS scores from the advisory related to the vulnerability.

CVSS scores from the advisory related to the vulnerability.

Examples found in repository?
src/json_deser.rs (lines 7700-7702)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to related_vulnerabilities.

To override the contents of this collection use set_related_vulnerabilities.

List of vulnerabilities that are related to this vulnerability.

List of vulnerabilities that are related to this vulnerability.

Examples found in repository?
src/json_deser.rs (lines 7705-7707)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Information about the vendor that generates the vulnerability report.

Information about the vendor that generates the vulnerability report.

Examples found in repository?
src/json_deser.rs (lines 7710-7712)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Appends an item to reference_urls.

To override the contents of this collection use set_reference_urls.

A list of URLs that provide additional information about the vulnerability.

A list of URLs that provide additional information about the vulnerability.

Examples found in repository?
src/json_deser.rs (lines 7715-7717)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Specifies if all vulnerable packages in a finding have a value for FixedInVersion and Remediation. This field is evaluated for each vulnerability Id based on the number of vulnerable packages that have a value for both FixedInVersion and Remediation. Valid values are as follows:

  • YES if all vulnerable packages have a value for both FixedInVersion and Remediation

  • NO if no vulnerable packages have a value for FixedInVersion and Remediation

  • PARTIAL otherwise

Specifies if all vulnerable packages in a finding have a value for FixedInVersion and Remediation. This field is evaluated for each vulnerability Id based on the number of vulnerable packages that have a value for both FixedInVersion and Remediation. Valid values are as follows:

  • YES if all vulnerable packages have a value for both FixedInVersion and Remediation

  • NO if no vulnerable packages have a value for FixedInVersion and Remediation

  • PARTIAL otherwise

Examples found in repository?
src/json_deser.rs (lines 7720-7732)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Consumes the builder and constructs a Vulnerability.

Examples found in repository?
src/json_deser.rs (line 7747)
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
pub(crate) fn deser_structure_crate_model_vulnerability<'a, I>(
    tokens: &mut std::iter::Peekable<I>,
) -> Result<
    Option<crate::model::Vulnerability>,
    aws_smithy_json::deserialize::error::DeserializeError,
>
where
    I: Iterator<
        Item = Result<
            aws_smithy_json::deserialize::Token<'a>,
            aws_smithy_json::deserialize::error::DeserializeError,
        >,
    >,
{
    match tokens.next().transpose()? {
        Some(aws_smithy_json::deserialize::Token::ValueNull { .. }) => Ok(None),
        Some(aws_smithy_json::deserialize::Token::StartObject { .. }) => {
            #[allow(unused_mut)]
            let mut builder = crate::model::vulnerability::Builder::default();
            loop {
                match tokens.next().transpose()? {
                    Some(aws_smithy_json::deserialize::Token::EndObject { .. }) => break,
                    Some(aws_smithy_json::deserialize::Token::ObjectKey { key, .. }) => {
                        match key.to_unescaped()?.as_ref() {
                            "Id" => {
                                builder = builder.set_id(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| s.to_unescaped().map(|u| u.into_owned()))
                                    .transpose()?,
                                );
                            }
                            "VulnerablePackages" => {
                                builder = builder.set_vulnerable_packages(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_software_package_list(tokens)?
                                );
                            }
                            "Cvss" => {
                                builder = builder.set_cvss(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_cvss_list(tokens)?
                                );
                            }
                            "RelatedVulnerabilities" => {
                                builder = builder.set_related_vulnerabilities(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "Vendor" => {
                                builder = builder.set_vendor(
                                    crate::json_deser::deser_structure_crate_model_vulnerability_vendor(tokens)?
                                );
                            }
                            "ReferenceUrls" => {
                                builder = builder.set_reference_urls(
                                    crate::json_deser::deser_list_com_amazonaws_securityhub_string_list(tokens)?
                                );
                            }
                            "FixAvailable" => {
                                builder = builder.set_fix_available(
                                    aws_smithy_json::deserialize::token::expect_string_or_null(
                                        tokens.next(),
                                    )?
                                    .map(|s| {
                                        s.to_unescaped().map(|u| {
                                            crate::model::VulnerabilityFixAvailable::from(
                                                u.as_ref(),
                                            )
                                        })
                                    })
                                    .transpose()?,
                                );
                            }
                            _ => aws_smithy_json::deserialize::token::skip_value(tokens)?,
                        }
                    }
                    other => {
                        return Err(
                            aws_smithy_json::deserialize::error::DeserializeError::custom(format!(
                                "expected object key or end object, found: {:?}",
                                other
                            )),
                        )
                    }
                }
            }
            Ok(Some(builder.build()))
        }
        _ => Err(
            aws_smithy_json::deserialize::error::DeserializeError::custom(
                "expected start object or null",
            ),
        ),
    }
}

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more