Class GranularMarking

java.lang.Object
security.whisper.javastix.datamarkings.GranularMarking
All Implemented Interfaces:
Serializable, StixCustomProperties, GranularMarkingDm, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public final class GranularMarking extends Object implements GranularMarkingDm
Immutable implementation of GranularMarkingDm.

Use the builder to create immutable instances: GranularMarking.builder().

See Also:
  • Method Details

    • getMarkingRef

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public MarkingDefinitionDm getMarkingRef()
      Specified by:
      getMarkingRef in interface GranularMarkingDm
      Returns:
      The value of the markingRef attribute
    • getCustomProperties

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableMap<String,Object> getCustomProperties()
      Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.
      Specified by:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withMarkingRef

      public final GranularMarking withMarkingRef(MarkingDefinitionDm value)
      Copy the current immutable object by setting a value for the markingRef attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for markingRef (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final GranularMarking withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of GranularMarking that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: markingRef, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value GranularMarking with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static GranularMarking copyOf(GranularMarkingDm instance)
      Creates an immutable copy of a GranularMarkingDm value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable GranularMarking instance
    • builder

      public static GranularMarking.Builder builder()
      Creates a builder for GranularMarking.
      Returns:
      A new GranularMarking builder