Package security.whisper.javastix.meta
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeLanguageContentObject. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forLanguageContentObject.static LanguageContentObjectcopyOf(LanguageContent instance) Creates an immutable copy of aLanguageContentvalue.booleanThis instance is equal to all instances ofLanguageContentObjectthat have equal attribute values.Custom Properties for STIX Objects.com.google.common.collect.ImmutableSet<ExternalReferenceType> com.google.common.collect.ImmutableSet<GranularMarkingDm> booleangetId()com.google.common.collect.ImmutableSet<String> com.google.common.collect.ImmutableSet<MarkingDefinitionDm> inthashCode()Computes a hash code from attributes:id,specVersion,createdByRef,created,modified,revoked,labels,confidence,externalReferences,objectMarkingRefs,granularMarkings,objectRef,objectModified,contents,hydrated,toJsonString,customProperties.toString()Prints the immutable valueLanguageContentwith attribute values.final LanguageContentObjectwithConfidence(int value) Copy the current immutable object by setting a present value for the optionalconfidenceattribute.final LanguageContentObjectwithConfidence(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theconfidenceattribute.final LanguageContentObjectCopy the current immutable object by replacing thecontentsmap with the specified map.final LanguageContentObjectwithCreated(StixInstant value) Copy the current immutable object by setting a value for thecreatedattribute.final LanguageContentObjectwithCreatedByRef(String value) Copy the current immutable object by setting a present value for the optionalcreatedByRefattribute.final LanguageContentObjectwithCreatedByRef(Optional<String> optional) Copy the current immutable object by setting an optional value for thecreatedByRefattribute.final LanguageContentObjectwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final LanguageContentObjectwithExternalReferences(Iterable<? extends ExternalReferenceType> elements) Copy the current immutable object with elements that replace the content ofexternalReferences.final LanguageContentObjectwithExternalReferences(ExternalReferenceType... elements) Copy the current immutable object with elements that replace the content ofexternalReferences.final LanguageContentObjectwithGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final LanguageContentObjectwithGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final LanguageContentObjectwithHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.final LanguageContentObjectCopy the current immutable object by setting a value for theidattribute.final LanguageContentObjectwithLabels(Iterable<String> elements) Copy the current immutable object with elements that replace the content oflabels.final LanguageContentObjectwithLabels(String... elements) Copy the current immutable object with elements that replace the content oflabels.final LanguageContentObjectwithModified(StixInstant value) Copy the current immutable object by setting a value for themodifiedattribute.final LanguageContentObjectwithObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final LanguageContentObjectwithObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final LanguageContentObjectwithObjectModified(StixInstant value) Copy the current immutable object by setting a value for theobjectModifiedattribute.final LanguageContentObjectwithObjectRef(String value) Copy the current immutable object by setting a value for theobjectRefattribute.final LanguageContentObjectwithRevoked(boolean value) Copy the current immutable object by setting a present value for the optionalrevokedattribute.final LanguageContentObjectwithRevoked(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for therevokedattribute.final LanguageContentObjectwithSpecVersion(String value) Copy the current immutable object by setting a value for thespecVersionattribute.final LanguageContentObjectwithToJsonString(String value) Copy the current immutable object by setting a value for thetoJsonStringattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.meta.LanguageContent
getType
-
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:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceLanguageContent- Returns:
- The value of the
idattribute
-
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:
getSpecVersionin interfaceLanguageContent- Returns:
- The value of the
specVersionattribute
-
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:
getCreatedByRefin interfaceLanguageContent- Returns:
- The value of the
createdByRefattribute
-
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:
getCreatedin interfaceLanguageContent- Returns:
- The value of the
createdattribute
-
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:
getModifiedin interfaceLanguageContent- Returns:
- The value of the
modifiedattribute
-
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:
getRevokedin interfaceLanguageContent- Returns:
- The value of the
revokedattribute
-
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:
getLabelsin interfaceLanguageContent- Returns:
- The value of the
labelsattribute
-
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:
getConfidencein interfaceLanguageContent- Returns:
- The value of the
confidenceattribute
-
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:
getExternalReferencesin interfaceLanguageContent- Returns:
- The value of the
externalReferencesattribute
-
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:
getObjectMarkingRefsin interfaceBundleableObject- Specified by:
getObjectMarkingRefsin interfaceLanguageContent- Returns:
- The value of the
objectMarkingRefsattribute
-
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:
getGranularMarkingsin interfaceBundleableObject- Specified by:
getGranularMarkingsin interfaceLanguageContent- Returns:
- The value of the
granularMarkingsattribute
-
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:
getObjectRefin interfaceLanguageContent- Returns:
- The value of the
objectRefattribute
-
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:
getObjectModifiedin interfaceLanguageContent- Returns:
- The value of the
objectModifiedattribute
-
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, getContents()String>> - Specified by:
getContentsin interfaceLanguageContent- Returns:
- The value of the
contentsattribute
-
getHydrated
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public boolean getHydrated()- Specified by:
getHydratedin interfaceBundleableObject- Returns:
- The value of the
hydratedattribute
-
toJsonString
@Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String toJsonString()- Specified by:
toJsonStringin interfaceBundleableObject- Returns:
- The value of the
toJsonStringattribute
-
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:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id (can benull)- Returns:
- A modified copy of the
thisobject
-
withSpecVersion
Copy the current immutable object by setting a value for thespecVersionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for specVersion- Returns:
- A modified copy of the
thisobject
-
withCreatedByRef
Copy the current immutable object by setting a present value for the optionalcreatedByRefattribute.- Parameters:
value- The value for createdByRef- Returns:
- A modified copy of
thisobject
-
withCreatedByRef
Copy the current immutable object by setting an optional value for thecreatedByRefattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for createdByRef- Returns:
- A modified copy of
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created (can benull)- Returns:
- A modified copy of the
thisobject
-
withModified
Copy the current immutable object by setting a value for themodifiedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for modified (can benull)- Returns:
- A modified copy of the
thisobject
-
withRevoked
Copy the current immutable object by setting a present value for the optionalrevokedattribute.- Parameters:
value- The value for revoked- Returns:
- A modified copy of
thisobject
-
withRevoked
Copy the current immutable object by setting an optional value for therevokedattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for revoked- Returns:
- A modified copy of
thisobject
-
withLabels
Copy the current immutable object with elements that replace the content oflabels.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withLabels
Copy the current immutable object with elements that replace the content oflabels. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of labels elements to set- Returns:
- A modified copy of
thisobject
-
withConfidence
Copy the current immutable object by setting a present value for the optionalconfidenceattribute.- Parameters:
value- The value for confidence- Returns:
- A modified copy of
thisobject
-
withConfidence
Copy the current immutable object by setting an optional value for theconfidenceattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for confidence- Returns:
- A modified copy of
thisobject
-
withExternalReferences
Copy the current immutable object with elements that replace the content ofexternalReferences.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExternalReferences
public final LanguageContentObject withExternalReferences(Iterable<? extends ExternalReferenceType> elements) Copy the current immutable object with elements that replace the content ofexternalReferences. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of externalReferences elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
public final LanguageContentObject withObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of objectMarkingRefs elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
public final LanguageContentObject withGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of granularMarkings elements to set- Returns:
- A modified copy of
thisobject
-
withObjectRef
Copy the current immutable object by setting a value for theobjectRefattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for objectRef (can benull)- Returns:
- A modified copy of the
thisobject
-
withObjectModified
Copy the current immutable object by setting a value for theobjectModifiedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for objectModified (can benull)- Returns:
- A modified copy of the
thisobject
-
withContents
Copy the current immutable object by replacing thecontentsmap 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 returningthis.- Parameters:
entries- The entries to be added to the contents map- Returns:
- A modified copy of
thisobject
-
withHydrated
Copy the current immutable object by setting a value for thehydratedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hydrated- Returns:
- A modified copy of the
thisobject
-
withToJsonString
Copy the current immutable object by setting a value for thetoJsonStringattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for toJsonString (can benull)- Returns:
- A modified copy of the
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap 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 returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofLanguageContentObjectthat have equal attribute values. -
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. -
toString
Prints the immutable valueLanguageContentwith attribute values. -
copyOf
Creates an immutable copy of aLanguageContentvalue. 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
Creates a builder forLanguageContentObject.- Returns:
- A new LanguageContentObject builder
-