All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.securityhub.model.Severity Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
 * the License. A copy of the License is located at
 * 
 * http://aws.amazon.com/apache2.0
 * 
 * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
 * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
 * and limitations under the License.
 */
package com.amazonaws.services.securityhub.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The severity of the finding. *

*

* The finding provider can provide the initial severity. The finding provider can only update the severity if it has * not been updated using BatchUpdateFindings. *

*

* The finding must have either Label or Normalized populated. If only one of these attributes * is populated, then Security Hub automatically populates the other one. If neither attribute is populated, then the * finding is invalid. Label is the preferred attribute. *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Severity implements Serializable, Cloneable, StructuredPojo { /** *

* Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original. *

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that generated * the finding. *

*/ private Double product; /** *

* The severity value of the finding. The allowed values are the following. *

*
    *
  • *

    * INFORMATIONAL - No issue was found. *

    *
  • *
  • *

    * LOW - The issue does not require action on its own. *

    *
  • *
  • *

    * MEDIUM - The issue must be addressed but not urgently. *

    *
  • *
  • *

    * HIGH - The issue must be addressed as a priority. *

    *
  • *
  • *

    * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

    *
  • *
*

* If you provide Normalized and do not provide Label, then Label is set * automatically as follows. *

*
    *
  • *

    * 0 - INFORMATIONAL *

    *
  • *
  • *

    * 1–39 - LOW *

    *
  • *
  • *

    * 40–69 - MEDIUM *

    *
  • *
  • *

    * 70–89 - HIGH *

    *
  • *
  • *

    * 90–100 - CRITICAL *

    *
  • *
*/ private String label; /** *

* Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label. *

*

* If you provide Label and do not provide Normalized, then Normalized is set * automatically as follows. *

*
    *
  • *

    * INFORMATIONAL - 0 *

    *
  • *
  • *

    * LOW - 1 *

    *
  • *
  • *

    * MEDIUM - 40 *

    *
  • *
  • *

    * HIGH - 70 *

    *
  • *
  • *

    * CRITICAL - 90 *

    *
  • *
*/ private Integer normalized; /** *

* The native severity from the finding product that generated the finding. *

*/ private String original; /** *

* Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original. *

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that generated * the finding. *

* * @param product * Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original.

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that * generated the finding. */ public void setProduct(Double product) { this.product = product; } /** *

* Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original. *

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that generated * the finding. *

* * @return Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original.

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that * generated the finding. */ public Double getProduct() { return this.product; } /** *

* Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original. *

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that generated * the finding. *

* * @param product * Deprecated. This attribute is being deprecated. Instead of providing Product, provide * Original.

*

* The native severity as defined by the Amazon Web Services service or integrated partner product that * generated the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Severity withProduct(Double product) { setProduct(product); return this; } /** *

* The severity value of the finding. The allowed values are the following. *

*
    *
  • *

    * INFORMATIONAL - No issue was found. *

    *
  • *
  • *

    * LOW - The issue does not require action on its own. *

    *
  • *
  • *

    * MEDIUM - The issue must be addressed but not urgently. *

    *
  • *
  • *

    * HIGH - The issue must be addressed as a priority. *

    *
  • *
  • *

    * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

    *
  • *
*

* If you provide Normalized and do not provide Label, then Label is set * automatically as follows. *

*
    *
  • *

    * 0 - INFORMATIONAL *

    *
  • *
  • *

    * 1–39 - LOW *

    *
  • *
  • *

    * 40–69 - MEDIUM *

    *
  • *
  • *

    * 70–89 - HIGH *

    *
  • *
  • *

    * 90–100 - CRITICAL *

    *
  • *
* * @param label * The severity value of the finding. The allowed values are the following.

*
    *
  • *

    * INFORMATIONAL - No issue was found. *

    *
  • *
  • *

    * LOW - The issue does not require action on its own. *

    *
  • *
  • *

    * MEDIUM - The issue must be addressed but not urgently. *

    *
  • *
  • *

    * HIGH - The issue must be addressed as a priority. *

    *
  • *
  • *

    * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

    *
  • *
*

* If you provide Normalized and do not provide Label, then Label is * set automatically as follows. *

*
    *
  • *

    * 0 - INFORMATIONAL *

    *
  • *
  • *

    * 1–39 - LOW *

    *
  • *
  • *

    * 40–69 - MEDIUM *

    *
  • *
  • *

    * 70–89 - HIGH *

    *
  • *
  • *

    * 90–100 - CRITICAL *

    *
  • * @see SeverityLabel */ public void setLabel(String label) { this.label = label; } /** *

    * The severity value of the finding. The allowed values are the following. *

    *
      *
    • *

      * INFORMATIONAL - No issue was found. *

      *
    • *
    • *

      * LOW - The issue does not require action on its own. *

      *
    • *
    • *

      * MEDIUM - The issue must be addressed but not urgently. *

      *
    • *
    • *

      * HIGH - The issue must be addressed as a priority. *

      *
    • *
    • *

      * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

      *
    • *
    *

    * If you provide Normalized and do not provide Label, then Label is set * automatically as follows. *

    *
      *
    • *

      * 0 - INFORMATIONAL *

      *
    • *
    • *

      * 1–39 - LOW *

      *
    • *
    • *

      * 40–69 - MEDIUM *

      *
    • *
    • *

      * 70–89 - HIGH *

      *
    • *
    • *

      * 90–100 - CRITICAL *

      *
    • *
    * * @return The severity value of the finding. The allowed values are the following.

    *
      *
    • *

      * INFORMATIONAL - No issue was found. *

      *
    • *
    • *

      * LOW - The issue does not require action on its own. *

      *
    • *
    • *

      * MEDIUM - The issue must be addressed but not urgently. *

      *
    • *
    • *

      * HIGH - The issue must be addressed as a priority. *

      *
    • *
    • *

      * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

      *
    • *
    *

    * If you provide Normalized and do not provide Label, then Label is * set automatically as follows. *

    *
      *
    • *

      * 0 - INFORMATIONAL *

      *
    • *
    • *

      * 1–39 - LOW *

      *
    • *
    • *

      * 40–69 - MEDIUM *

      *
    • *
    • *

      * 70–89 - HIGH *

      *
    • *
    • *

      * 90–100 - CRITICAL *

      *
    • * @see SeverityLabel */ public String getLabel() { return this.label; } /** *

      * The severity value of the finding. The allowed values are the following. *

      *
        *
      • *

        * INFORMATIONAL - No issue was found. *

        *
      • *
      • *

        * LOW - The issue does not require action on its own. *

        *
      • *
      • *

        * MEDIUM - The issue must be addressed but not urgently. *

        *
      • *
      • *

        * HIGH - The issue must be addressed as a priority. *

        *
      • *
      • *

        * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

        *
      • *
      *

      * If you provide Normalized and do not provide Label, then Label is set * automatically as follows. *

      *
        *
      • *

        * 0 - INFORMATIONAL *

        *
      • *
      • *

        * 1–39 - LOW *

        *
      • *
      • *

        * 40–69 - MEDIUM *

        *
      • *
      • *

        * 70–89 - HIGH *

        *
      • *
      • *

        * 90–100 - CRITICAL *

        *
      • *
      * * @param label * The severity value of the finding. The allowed values are the following.

      *
        *
      • *

        * INFORMATIONAL - No issue was found. *

        *
      • *
      • *

        * LOW - The issue does not require action on its own. *

        *
      • *
      • *

        * MEDIUM - The issue must be addressed but not urgently. *

        *
      • *
      • *

        * HIGH - The issue must be addressed as a priority. *

        *
      • *
      • *

        * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

        *
      • *
      *

      * If you provide Normalized and do not provide Label, then Label is * set automatically as follows. *

      *
        *
      • *

        * 0 - INFORMATIONAL *

        *
      • *
      • *

        * 1–39 - LOW *

        *
      • *
      • *

        * 40–69 - MEDIUM *

        *
      • *
      • *

        * 70–89 - HIGH *

        *
      • *
      • *

        * 90–100 - CRITICAL *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see SeverityLabel */ public Severity withLabel(String label) { setLabel(label); return this; } /** *

        * The severity value of the finding. The allowed values are the following. *

        *
          *
        • *

          * INFORMATIONAL - No issue was found. *

          *
        • *
        • *

          * LOW - The issue does not require action on its own. *

          *
        • *
        • *

          * MEDIUM - The issue must be addressed but not urgently. *

          *
        • *
        • *

          * HIGH - The issue must be addressed as a priority. *

          *
        • *
        • *

          * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

          *
        • *
        *

        * If you provide Normalized and do not provide Label, then Label is set * automatically as follows. *

        *
          *
        • *

          * 0 - INFORMATIONAL *

          *
        • *
        • *

          * 1–39 - LOW *

          *
        • *
        • *

          * 40–69 - MEDIUM *

          *
        • *
        • *

          * 70–89 - HIGH *

          *
        • *
        • *

          * 90–100 - CRITICAL *

          *
        • *
        * * @param label * The severity value of the finding. The allowed values are the following.

        *
          *
        • *

          * INFORMATIONAL - No issue was found. *

          *
        • *
        • *

          * LOW - The issue does not require action on its own. *

          *
        • *
        • *

          * MEDIUM - The issue must be addressed but not urgently. *

          *
        • *
        • *

          * HIGH - The issue must be addressed as a priority. *

          *
        • *
        • *

          * CRITICAL - The issue must be remediated immediately to avoid it escalating. *

          *
        • *
        *

        * If you provide Normalized and do not provide Label, then Label is * set automatically as follows. *

        *
          *
        • *

          * 0 - INFORMATIONAL *

          *
        • *
        • *

          * 1–39 - LOW *

          *
        • *
        • *

          * 40–69 - MEDIUM *

          *
        • *
        • *

          * 70–89 - HIGH *

          *
        • *
        • *

          * 90–100 - CRITICAL *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see SeverityLabel */ public Severity withLabel(SeverityLabel label) { this.label = label.toString(); return this; } /** *

          * Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label. *

          *

          * If you provide Label and do not provide Normalized, then Normalized is set * automatically as follows. *

          *
            *
          • *

            * INFORMATIONAL - 0 *

            *
          • *
          • *

            * LOW - 1 *

            *
          • *
          • *

            * MEDIUM - 40 *

            *
          • *
          • *

            * HIGH - 70 *

            *
          • *
          • *

            * CRITICAL - 90 *

            *
          • *
          * * @param normalized * Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label.

          *

          * If you provide Label and do not provide Normalized, then Normalized * is set automatically as follows. *

          *
            *
          • *

            * INFORMATIONAL - 0 *

            *
          • *
          • *

            * LOW - 1 *

            *
          • *
          • *

            * MEDIUM - 40 *

            *
          • *
          • *

            * HIGH - 70 *

            *
          • *
          • *

            * CRITICAL - 90 *

            *
          • */ public void setNormalized(Integer normalized) { this.normalized = normalized; } /** *

            * Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label. *

            *

            * If you provide Label and do not provide Normalized, then Normalized is set * automatically as follows. *

            *
              *
            • *

              * INFORMATIONAL - 0 *

              *
            • *
            • *

              * LOW - 1 *

              *
            • *
            • *

              * MEDIUM - 40 *

              *
            • *
            • *

              * HIGH - 70 *

              *
            • *
            • *

              * CRITICAL - 90 *

              *
            • *
            * * @return Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of * providing Normalized, provide Label.

            *

            * If you provide Label and do not provide Normalized, then * Normalized is set automatically as follows. *

            *
              *
            • *

              * INFORMATIONAL - 0 *

              *
            • *
            • *

              * LOW - 1 *

              *
            • *
            • *

              * MEDIUM - 40 *

              *
            • *
            • *

              * HIGH - 70 *

              *
            • *
            • *

              * CRITICAL - 90 *

              *
            • */ public Integer getNormalized() { return this.normalized; } /** *

              * Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label. *

              *

              * If you provide Label and do not provide Normalized, then Normalized is set * automatically as follows. *

              *
                *
              • *

                * INFORMATIONAL - 0 *

                *
              • *
              • *

                * LOW - 1 *

                *
              • *
              • *

                * MEDIUM - 40 *

                *
              • *
              • *

                * HIGH - 70 *

                *
              • *
              • *

                * CRITICAL - 90 *

                *
              • *
              * * @param normalized * Deprecated. The normalized severity of a finding. This attribute is being deprecated. Instead of providing * Normalized, provide Label.

              *

              * If you provide Label and do not provide Normalized, then Normalized * is set automatically as follows. *

              *
                *
              • *

                * INFORMATIONAL - 0 *

                *
              • *
              • *

                * LOW - 1 *

                *
              • *
              • *

                * MEDIUM - 40 *

                *
              • *
              • *

                * HIGH - 70 *

                *
              • *
              • *

                * CRITICAL - 90 *

                *
              • * @return Returns a reference to this object so that method calls can be chained together. */ public Severity withNormalized(Integer normalized) { setNormalized(normalized); return this; } /** *

                * The native severity from the finding product that generated the finding. *

                * * @param original * The native severity from the finding product that generated the finding. */ public void setOriginal(String original) { this.original = original; } /** *

                * The native severity from the finding product that generated the finding. *

                * * @return The native severity from the finding product that generated the finding. */ public String getOriginal() { return this.original; } /** *

                * The native severity from the finding product that generated the finding. *

                * * @param original * The native severity from the finding product that generated the finding. * @return Returns a reference to this object so that method calls can be chained together. */ public Severity withOriginal(String original) { setOriginal(original); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getProduct() != null) sb.append("Product: ").append(getProduct()).append(","); if (getLabel() != null) sb.append("Label: ").append(getLabel()).append(","); if (getNormalized() != null) sb.append("Normalized: ").append(getNormalized()).append(","); if (getOriginal() != null) sb.append("Original: ").append(getOriginal()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Severity == false) return false; Severity other = (Severity) obj; if (other.getProduct() == null ^ this.getProduct() == null) return false; if (other.getProduct() != null && other.getProduct().equals(this.getProduct()) == false) return false; if (other.getLabel() == null ^ this.getLabel() == null) return false; if (other.getLabel() != null && other.getLabel().equals(this.getLabel()) == false) return false; if (other.getNormalized() == null ^ this.getNormalized() == null) return false; if (other.getNormalized() != null && other.getNormalized().equals(this.getNormalized()) == false) return false; if (other.getOriginal() == null ^ this.getOriginal() == null) return false; if (other.getOriginal() != null && other.getOriginal().equals(this.getOriginal()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getProduct() == null) ? 0 : getProduct().hashCode()); hashCode = prime * hashCode + ((getLabel() == null) ? 0 : getLabel().hashCode()); hashCode = prime * hashCode + ((getNormalized() == null) ? 0 : getNormalized().hashCode()); hashCode = prime * hashCode + ((getOriginal() == null) ? 0 : getOriginal().hashCode()); return hashCode; } @Override public Severity clone() { try { return (Severity) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.securityhub.model.transform.SeverityMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy