Class ExtensionDefinitionObject

java.lang.Object
security.whisper.javastix.meta.ExtensionDefinitionObject
All Implemented Interfaces:
Serializable, BundleableObject, Stix, StixCustomProperties, ExtensionDefinition

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

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

See Also:
  • Method Details

    • getId

      @JsonPropertyDescription("Specifies the identifier for this Extension Definition object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getId()
      Specified by:
      getId in interface BundleableObject
      Specified by:
      getId in interface ExtensionDefinition
      Returns:
      The value of the id attribute
    • getSpecVersion

      @JsonPropertyDescription("The version of the STIX specification used to represent this object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getSpecVersion()
      Specified by:
      getSpecVersion in interface ExtensionDefinition
      Returns:
      The value of the specVersion attribute
    • getCreatedByRef

      @JsonPropertyDescription("The ID of the identity that created this extension definition.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getCreatedByRef()
      Specified by:
      getCreatedByRef in interface ExtensionDefinition
      Returns:
      The value of the createdByRef attribute
    • getCreated

      @JsonPropertyDescription("The created property represents the time at which this object was originally created.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixInstant getCreated()
      Specified by:
      getCreated in interface ExtensionDefinition
      Returns:
      The value of the created attribute
    • getModified

      @JsonPropertyDescription("The modified property represents the time at which this object was last modified.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixInstant getModified()
      Specified by:
      getModified in interface ExtensionDefinition
      Returns:
      The value of the modified attribute
    • getRevoked

      @JsonPropertyDescription("The revoked property is a boolean that indicates whether the object has been revoked.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<Boolean> getRevoked()
      Specified by:
      getRevoked in interface ExtensionDefinition
      Returns:
      The value of the revoked attribute
    • getLabels

      @JsonPropertyDescription("The labels property specifies a set of categorization labels.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getLabels()
      Specified by:
      getLabels in interface ExtensionDefinition
      Returns:
      The value of the labels attribute
    • getConfidence

      @JsonPropertyDescription("The confidence property identifies the confidence that the creator has in the correctness of their data.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<Integer> getConfidence()
      Specified by:
      getConfidence in interface ExtensionDefinition
      Returns:
      The value of the confidence attribute
    • getExternalReferences

      @JsonPropertyDescription("A list of external references which refer to non-STIX information.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<ExternalReferenceType> getExternalReferences()
      Specified by:
      getExternalReferences in interface ExtensionDefinition
      Returns:
      The value of the externalReferences attribute
    • getObjectMarkingRefs

      @JsonPropertyDescription("The list of marking-definition objects to be applied to this object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<MarkingDefinitionDm> getObjectMarkingRefs()
      Specified by:
      getObjectMarkingRefs in interface BundleableObject
      Specified by:
      getObjectMarkingRefs in interface ExtensionDefinition
      Returns:
      The value of the objectMarkingRefs attribute
    • getGranularMarkings

      @JsonPropertyDescription("The set of granular markings that apply to this object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<GranularMarkingDm> getGranularMarkings()
      Specified by:
      getGranularMarkings in interface BundleableObject
      Specified by:
      getGranularMarkings in interface ExtensionDefinition
      Returns:
      The value of the granularMarkings attribute
    • getName

      @JsonPropertyDescription("The name of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getName()
      Specified by:
      getName in interface ExtensionDefinition
      Returns:
      The value of the name attribute
    • getDescription

      @JsonPropertyDescription("A detailed description of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getDescription()
      Specified by:
      getDescription in interface ExtensionDefinition
      Returns:
      The value of the description attribute
    • getSchema

      @JsonPropertyDescription("The JSON schema for this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableMap<String,Object> getSchema()
      Specified by:
      getSchema in interface ExtensionDefinition
      Returns:
      The value of the schema attribute
    • getVersion

      @JsonPropertyDescription("The version of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getVersion()
      Specified by:
      getVersion in interface ExtensionDefinition
      Returns:
      The value of the version attribute
    • getExtensionTypes

      @JsonPropertyDescription("A list of the types of STIX Objects that this extension can be applied to.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getExtensionTypes()
      Specified by:
      getExtensionTypes in interface ExtensionDefinition
      Returns:
      The value of the extensionTypes attribute
    • getExtensionProperties

      @JsonPropertyDescription("The list of properties that this extension adds to the objects it extends.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableSet<String> getExtensionProperties()
      Specified by:
      getExtensionProperties in interface ExtensionDefinition
      Returns:
      The value of the extensionProperties attribute
    • getHydrated

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public boolean getHydrated()
      Specified by:
      getHydrated in interface BundleableObject
      Returns:
      The value of the hydrated attribute
    • toJsonString

      @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String toJsonString()
      Specified by:
      toJsonString in interface BundleableObject
      Returns:
      The value of the toJsonString 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>
    • withId

      public final ExtensionDefinitionObject withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id (can be null)
      Returns:
      A modified copy of the this object
    • withSpecVersion

      public final ExtensionDefinitionObject withSpecVersion(String value)
      Copy the current immutable object by setting a value for the specVersion attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for specVersion
      Returns:
      A modified copy of the this object
    • withCreatedByRef

      public final ExtensionDefinitionObject withCreatedByRef(String value)
      Copy the current immutable object by setting a present value for the optional createdByRef attribute.
      Parameters:
      value - The value for createdByRef
      Returns:
      A modified copy of this object
    • withCreatedByRef

      public final ExtensionDefinitionObject withCreatedByRef(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the createdByRef attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for createdByRef
      Returns:
      A modified copy of this object
    • withCreated

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

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

      public final ExtensionDefinitionObject withRevoked(boolean value)
      Copy the current immutable object by setting a present value for the optional revoked attribute.
      Parameters:
      value - The value for revoked
      Returns:
      A modified copy of this object
    • withRevoked

      public final ExtensionDefinitionObject withRevoked(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the revoked attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for revoked
      Returns:
      A modified copy of this object
    • withLabels

      public final ExtensionDefinitionObject withLabels(String... elements)
      Copy the current immutable object with elements that replace the content of labels.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLabels

      public final ExtensionDefinitionObject withLabels(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of labels. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of labels elements to set
      Returns:
      A modified copy of this object
    • withConfidence

      public final ExtensionDefinitionObject withConfidence(int value)
      Copy the current immutable object by setting a present value for the optional confidence attribute.
      Parameters:
      value - The value for confidence
      Returns:
      A modified copy of this object
    • withConfidence

      public final ExtensionDefinitionObject withConfidence(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the confidence attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for confidence
      Returns:
      A modified copy of this object
    • withExternalReferences

      public final ExtensionDefinitionObject withExternalReferences(ExternalReferenceType... elements)
      Copy the current immutable object with elements that replace the content of externalReferences.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExternalReferences

      public final ExtensionDefinitionObject withExternalReferences(Iterable<? extends ExternalReferenceType> elements)
      Copy the current immutable object with elements that replace the content of externalReferences. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of externalReferences elements to set
      Returns:
      A modified copy of this object
    • withObjectMarkingRefs

      public final ExtensionDefinitionObject withObjectMarkingRefs(MarkingDefinitionDm... elements)
      Copy the current immutable object with elements that replace the content of objectMarkingRefs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withObjectMarkingRefs

      public final ExtensionDefinitionObject withObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements)
      Copy the current immutable object with elements that replace the content of objectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of objectMarkingRefs elements to set
      Returns:
      A modified copy of this object
    • withGranularMarkings

      public final ExtensionDefinitionObject withGranularMarkings(GranularMarkingDm... elements)
      Copy the current immutable object with elements that replace the content of granularMarkings.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withGranularMarkings

      public final ExtensionDefinitionObject withGranularMarkings(Iterable<? extends GranularMarkingDm> elements)
      Copy the current immutable object with elements that replace the content of granularMarkings. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of granularMarkings elements to set
      Returns:
      A modified copy of this object
    • withName

      public final ExtensionDefinitionObject withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name (can be null)
      Returns:
      A modified copy of the this object
    • withDescription

      public final ExtensionDefinitionObject withDescription(String value)
      Copy the current immutable object by setting a present value for the optional description attribute.
      Parameters:
      value - The value for description
      Returns:
      A modified copy of this object
    • withDescription

      public final ExtensionDefinitionObject withDescription(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the description attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for description
      Returns:
      A modified copy of this object
    • withSchema

      public final ExtensionDefinitionObject withSchema(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the schema 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 schema map
      Returns:
      A modified copy of this object
    • withVersion

      public final ExtensionDefinitionObject withVersion(String value)
      Copy the current immutable object by setting a value for the version attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for version (can be null)
      Returns:
      A modified copy of the this object
    • withExtensionTypes

      public final ExtensionDefinitionObject withExtensionTypes(String... elements)
      Copy the current immutable object with elements that replace the content of extensionTypes.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExtensionTypes

      public final ExtensionDefinitionObject withExtensionTypes(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of extensionTypes. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of extensionTypes elements to set
      Returns:
      A modified copy of this object
    • withExtensionProperties

      public final ExtensionDefinitionObject withExtensionProperties(String... elements)
      Copy the current immutable object with elements that replace the content of extensionProperties.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withExtensionProperties

      public final ExtensionDefinitionObject withExtensionProperties(Iterable<String> elements)
      Copy the current immutable object with elements that replace the content of extensionProperties. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of extensionProperties elements to set
      Returns:
      A modified copy of this object
    • withHydrated

      public final ExtensionDefinitionObject withHydrated(boolean value)
      Copy the current immutable object by setting a value for the hydrated attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for hydrated
      Returns:
      A modified copy of the this object
    • withToJsonString

      public final ExtensionDefinitionObject withToJsonString(String value)
      Copy the current immutable object by setting a value for the toJsonString attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for toJsonString (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final ExtensionDefinitionObject 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 ExtensionDefinitionObject 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: id, specVersion, createdByRef, created, modified, revoked, labels, confidence, externalReferences, objectMarkingRefs, granularMarkings, name, description, schema, version, extensionTypes, extensionProperties, hydrated, toJsonString, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ExtensionDefinitionObject copyOf(ExtensionDefinition instance)
      Creates an immutable copy of a ExtensionDefinition 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 ExtensionDefinition instance
    • builder

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