Class Directory
java.lang.Object
security.whisper.javastix.coo.objects.Directory
- All Implemented Interfaces:
Serializable,BundleableObject,Stix,StixCustomProperties,CyberObservableObject,CyberObservableObjectCommonProperties,DirectoryCoo,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class Directory
extends Object
implements DirectoryCoo
directory
The Directory Object represents the properties common to a file system directory.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic Directory.Builderbuilder()Creates a builder forDirectory.static DirectorycopyOf(DirectoryCoo instance) Creates an immutable copy of aDirectoryCoovalue.booleanThis instance is equal to all instances ofDirectorythat have equal attribute values.Custom Properties for STIX Objects.Indicates whether the data contained in the SCO has been defanged.com.google.common.collect.ImmutableSet<CyberObservableExtension> Multiple extensions can be added, but only 1 instance of a specific extension can be added.com.google.common.collect.ImmutableSet<GranularMarkingDm> booleangetId()Deterministically generates the ID for this directory based on its path.com.google.common.collect.ImmutableSet<MarkingDefinitionDm> Used for generation of Map Keys byManually set this value if you want to control key names.invalid reference
ObservedDataSdo#getObjects()getPath()This value MUST be specified using the corresponding name from the 2013-12-20 revision of the IANA character set registry.getType()inthashCode()Computes a hash code from attributes:path,pathEnc,created,modified,accessed,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString.toString()Prints the immutable valueDirectorywith attribute values.final DirectorywithAccessed(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theaccessedattribute.final DirectorywithAccessed(StixInstant value) Copy the current immutable object by setting a present value for the optionalaccessedattribute.final DirectorywithCreated(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for thecreatedattribute.final DirectorywithCreated(StixInstant value) Copy the current immutable object by setting a present value for the optionalcreatedattribute.final DirectorywithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final DirectorywithDefanged(boolean value) Copy the current immutable object by setting a present value for the optionaldefangedattribute.final DirectorywithDefanged(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedefangedattribute.final DirectorywithExtensions(Iterable<? extends CyberObservableExtension> elements) Copy the current immutable object with elements that replace the content ofextensions.final DirectorywithExtensions(CyberObservableExtension... elements) Copy the current immutable object with elements that replace the content ofextensions.final DirectorywithGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final DirectorywithGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final DirectorywithHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.final DirectorywithModified(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for themodifiedattribute.final DirectorywithModified(StixInstant value) Copy the current immutable object by setting a present value for the optionalmodifiedattribute.final DirectorywithObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final DirectorywithObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final DirectorywithObservableObjectKey(String value) Copy the current immutable object by setting a value for theobservableObjectKeyattribute.final DirectoryCopy the current immutable object by setting a value for thepathattribute.final DirectorywithPathEnc(String value) Copy the current immutable object by setting a present value for the optionalpathEncattribute.final DirectorywithPathEnc(Optional<String> optional) Copy the current immutable object by setting an optional value for thepathEncattribute.final DirectorywithToJsonString(String value) Copy the current immutable object by setting a value for thetoJsonStringattribute.final DirectoryCopy the current immutable object by setting a value for thetypeattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.coo.objects.DirectoryCoo
getContainsRefsMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getPath
@JsonPropertyDescription("Specifies the path, as originally observed, to the directory on the file system.") public String getPath()- Specified by:
getPathin interfaceDirectoryCoo- Returns:
- The value of the
pathattribute
-
getPathEnc
@JsonPropertyDescription("Specifies the observed encoding for the path.") public Optional<String> getPathEnc()This value MUST be specified using the corresponding name from the 2013-12-20 revision of the IANA character set registry.- Specified by:
getPathEncin interfaceDirectoryCoo
-
getCreated
@JsonPropertyDescription("Specifies the date/time the directory was created.") public Optional<StixInstant> getCreated()- Specified by:
getCreatedin interfaceDirectoryCoo- Returns:
- The value of the
createdattribute
-
getModified
@JsonPropertyDescription("Specifies the date/time the directory was last written to/modified.") public Optional<StixInstant> getModified()- Specified by:
getModifiedin interfaceDirectoryCoo- Returns:
- The value of the
modifiedattribute
-
getAccessed
@JsonPropertyDescription("Specifies the date/time the directory was last accessed.") public Optional<StixInstant> getAccessed()- Specified by:
getAccessedin interfaceDirectoryCoo- Returns:
- The value of the
accessedattribute
-
getId
Deterministically generates the ID for this directory based on its path.- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceCyberObservableObjectCommonProperties- Specified by:
getIdin interfaceDirectoryCoo
-
getType
- Specified by:
getTypein interfaceBundleableObject- Specified by:
getTypein interfaceCyberObservableObjectCommonProperties- Returns:
- The value of the
typeattribute
-
getExtensions
@JsonPropertyDescription("Specifies any extensions of the object, as a dictionary.") public com.google.common.collect.ImmutableSet<CyberObservableExtension> getExtensions()Multiple extensions can be added, but only 1 instance of a specific extension can be added.- Specified by:
getExtensionsin interfaceCyberObservableObjectCommonProperties
-
getObservableObjectKey
Used for generation of Map Keys byManually set this value if you want to control key names. Otherwise UUIDs will be used.invalid reference
ObservedDataSdo#getObjects()- Specified by:
getObservableObjectKeyin interfaceCyberObservableObjectCommonProperties
-
getDefanged
@JsonPropertyDescription("Indicates whether the data contained in the SCO has been defanged.") public Optional<Boolean> getDefanged()Indicates whether the data contained in the SCO has been defanged. Defanging refers to the process of modifying data to make it safe to handle (e.g., changing an IP address from 192.168.1.1 to 192[.]168[.]1[.]1).- Specified by:
getDefangedin interfaceCyberObservableObjectCommonProperties
-
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>
-
getObjectMarkingRefs
- Specified by:
getObjectMarkingRefsin interfaceBundleableObject- Returns:
- The value of the
objectMarkingRefsattribute
-
getGranularMarkings
- Specified by:
getGranularMarkingsin interfaceBundleableObject- Returns:
- The value of the
granularMarkingsattribute
-
getHydrated
public boolean getHydrated()- Specified by:
getHydratedin interfaceBundleableObject- Returns:
- The value of the
hydratedattribute
-
toJsonString
- Specified by:
toJsonStringin interfaceBundleableObject- Returns:
- The value of the
toJsonStringattribute
-
withPath
Copy the current immutable object by setting a value for thepathattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for path (can benull)- Returns:
- A modified copy of the
thisobject
-
withPathEnc
Copy the current immutable object by setting a present value for the optionalpathEncattribute.- Parameters:
value- The value for pathEnc- Returns:
- A modified copy of
thisobject
-
withPathEnc
Copy the current immutable object by setting an optional value for thepathEncattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for pathEnc- Returns:
- A modified copy of
thisobject
-
withCreated
Copy the current immutable object by setting a present value for the optionalcreatedattribute.- Parameters:
value- The value for created- Returns:
- A modified copy of
thisobject
-
withCreated
Copy the current immutable object by setting an optional value for thecreatedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for created- Returns:
- A modified copy of
thisobject
-
withModified
Copy the current immutable object by setting a present value for the optionalmodifiedattribute.- Parameters:
value- The value for modified- Returns:
- A modified copy of
thisobject
-
withModified
Copy the current immutable object by setting an optional value for themodifiedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for modified- Returns:
- A modified copy of
thisobject
-
withAccessed
Copy the current immutable object by setting a present value for the optionalaccessedattribute.- Parameters:
value- The value for accessed- Returns:
- A modified copy of
thisobject
-
withAccessed
Copy the current immutable object by setting an optional value for theaccessedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accessed- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extensions elements to set- Returns:
- A modified copy of
thisobject
-
withObservableObjectKey
Copy the current immutable object by setting a value for theobservableObjectKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for observableObjectKey- Returns:
- A modified copy of the
thisobject
-
withDefanged
Copy the current immutable object by setting a present value for the optionaldefangedattribute.- Parameters:
value- The value for defanged- Returns:
- A modified copy of
thisobject
-
withDefanged
Copy the current immutable object by setting an optional value for thedefangedattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for defanged- Returns:
- A modified copy of
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
-
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
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
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
-
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
-
equals
This instance is equal to all instances ofDirectorythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:path,pathEnc,created,modified,accessed,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString. -
toString
Prints the immutable valueDirectorywith attribute values. -
copyOf
Creates an immutable copy of aDirectoryCoovalue. 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 Directory instance
-
builder
Creates a builder forDirectory.- Returns:
- A new Directory builder
-