Package security.whisper.javastix.meta
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeExtensionDefinitionObject. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forExtensionDefinitionObject.static ExtensionDefinitionObjectcopyOf(ExtensionDefinition instance) Creates an immutable copy of aExtensionDefinitionvalue.booleanThis instance is equal to all instances ofExtensionDefinitionObjectthat have equal attribute values.Custom Properties for STIX Objects.com.google.common.collect.ImmutableSet<String> com.google.common.collect.ImmutableSet<String> com.google.common.collect.ImmutableSet<ExternalReferenceType> com.google.common.collect.ImmutableSet<GranularMarkingDm> booleangetId()com.google.common.collect.ImmutableSet<String> getName()com.google.common.collect.ImmutableSet<MarkingDefinitionDm> inthashCode()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.toString()Prints the immutable valueExtensionDefinitionwith attribute values.withConfidence(int value) Copy the current immutable object by setting a present value for the optionalconfidenceattribute.withConfidence(Optional<Integer> optional) Copy the current immutable object by setting an optional value for theconfidenceattribute.withCreated(StixInstant value) Copy the current immutable object by setting a value for thecreatedattribute.withCreatedByRef(String value) Copy the current immutable object by setting a present value for the optionalcreatedByRefattribute.withCreatedByRef(Optional<String> optional) Copy the current immutable object by setting an optional value for thecreatedByRefattribute.withCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.withDescription(String value) Copy the current immutable object by setting a present value for the optionaldescriptionattribute.withDescription(Optional<String> optional) Copy the current immutable object by setting an optional value for thedescriptionattribute.withExtensionProperties(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofextensionProperties.withExtensionProperties(String... elements) Copy the current immutable object with elements that replace the content ofextensionProperties.withExtensionTypes(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofextensionTypes.withExtensionTypes(String... elements) Copy the current immutable object with elements that replace the content ofextensionTypes.withExternalReferences(Iterable<? extends ExternalReferenceType> elements) Copy the current immutable object with elements that replace the content ofexternalReferences.withExternalReferences(ExternalReferenceType... elements) Copy the current immutable object with elements that replace the content ofexternalReferences.withGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.withGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.withHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.Copy the current immutable object by setting a value for theidattribute.withLabels(Iterable<String> elements) Copy the current immutable object with elements that replace the content oflabels.withLabels(String... elements) Copy the current immutable object with elements that replace the content oflabels.withModified(StixInstant value) Copy the current immutable object by setting a value for themodifiedattribute.Copy the current immutable object by setting a value for thenameattribute.withObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.withObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.withRevoked(boolean value) Copy the current immutable object by setting a present value for the optionalrevokedattribute.withRevoked(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for therevokedattribute.withSchema(Map<String, ? extends Object> entries) Copy the current immutable object by replacing theschemamap with the specified map.withSpecVersion(String value) Copy the current immutable object by setting a value for thespecVersionattribute.withToJsonString(String value) Copy the current immutable object by setting a value for thetoJsonStringattribute.withVersion(String value) Copy the current immutable object by setting a value for theversionattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.meta.ExtensionDefinition
getType
-
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:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceExtensionDefinition- 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 interfaceExtensionDefinition- Returns:
- The value of the
specVersionattribute
-
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:
getCreatedByRefin interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- 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 interfaceExtensionDefinition- Returns:
- The value of the
granularMarkingsattribute
-
getName
@JsonPropertyDescription("The name of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getName()- Specified by:
getNamein interfaceExtensionDefinition- Returns:
- The value of the
nameattribute
-
getDescription
@JsonPropertyDescription("A detailed description of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public Optional<String> getDescription()- Specified by:
getDescriptionin interfaceExtensionDefinition- Returns:
- The value of the
descriptionattribute
-
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:
getSchemain interfaceExtensionDefinition- Returns:
- The value of the
schemaattribute
-
getVersion
@JsonPropertyDescription("The version of this extension.") @Redactable(useMask=false, redactionMask="\u2588\u2588REDACTED\u2588\u2588") public String getVersion()- Specified by:
getVersionin interfaceExtensionDefinition- Returns:
- The value of the
versionattribute
-
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:
getExtensionTypesin interfaceExtensionDefinition- Returns:
- The value of the
extensionTypesattribute
-
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:
getExtensionPropertiesin interfaceExtensionDefinition- Returns:
- The value of the
extensionPropertiesattribute
-
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 ExtensionDefinitionObject 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 ExtensionDefinitionObject 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 ExtensionDefinitionObject 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
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withDescription
Copy the current immutable object by setting a present value for the optionaldescriptionattribute.- Parameters:
value- The value for description- Returns:
- A modified copy of
thisobject
-
withDescription
Copy the current immutable object by setting an optional value for thedescriptionattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for description- Returns:
- A modified copy of
thisobject
-
withSchema
Copy the current immutable object by replacing theschemamap 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 schema map- Returns:
- A modified copy of
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version (can benull)- Returns:
- A modified copy of the
thisobject
-
withExtensionTypes
Copy the current immutable object with elements that replace the content ofextensionTypes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtensionTypes
Copy the current immutable object with elements that replace the content ofextensionTypes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extensionTypes elements to set- Returns:
- A modified copy of
thisobject
-
withExtensionProperties
Copy the current immutable object with elements that replace the content ofextensionProperties.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtensionProperties
Copy the current immutable object with elements that replace the content ofextensionProperties. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extensionProperties elements to set- 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 ofExtensionDefinitionObjectthat 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,name,description,schema,version,extensionTypes,extensionProperties,hydrated,toJsonString,customProperties. -
toString
Prints the immutable valueExtensionDefinitionwith attribute values. -
copyOf
Creates an immutable copy of aExtensionDefinitionvalue. 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
Creates a builder forExtensionDefinitionObject.- Returns:
- A new ExtensionDefinitionObject builder
-