Class LanguageContentObject

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

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

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

See Also:
  • Method Details

    • getId

      @JsonPropertyDescription("Specifies the identifier for this Language Content object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getId()
      Specified by:
      getId in interface BundleableObject
      Specified by:
      getId in interface LanguageContent
      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 LanguageContent
      Returns:
      The value of the specVersion attribute
    • getCreatedByRef

      @JsonPropertyDescription("The ID of the identity that created this language content object.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getCreatedByRef()
      Specified by:
      getCreatedByRef in interface LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      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 LanguageContent
      Returns:
      The value of the granularMarkings attribute
    • getObjectRef

      @JsonPropertyDescription("Specifies the identifier of the object that this language content applies to.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getObjectRef()
      Specified by:
      getObjectRef in interface LanguageContent
      Returns:
      The value of the objectRef attribute
    • getObjectModified

      @JsonPropertyDescription("Specifies the modified time of the object that this language content applies to.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public StixInstant getObjectModified()
      Specified by:
      getObjectModified in interface LanguageContent
      Returns:
      The value of the objectModified attribute
    • getContents

      @JsonPropertyDescription("A dictionary that captures the text content in different languages. The key is the language code and the value is a dictionary containing the translated content.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public com.google.common.collect.ImmutableMap<String,Map<String,String>> getContents()
      Specified by:
      getContents in interface LanguageContent
      Returns:
      The value of the contents 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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
    • withObjectRef

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

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

      public final LanguageContentObject withContents(Map<String,? extends Map<String,String>> entries)
      Copy the current immutable object by replacing the contents 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 contents map
      Returns:
      A modified copy of this object
    • withHydrated

      public final LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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 LanguageContentObject 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, objectRef, objectModified, contents, hydrated, toJsonString, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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