Class Directory.Builder
java.lang.Object
security.whisper.javastix.coo.objects.Directory.Builder
- Enclosing class:
Directory
-
Method Summary
Modifier and TypeMethodDescriptionfinal Directory.Builderaccessed(Optional<? extends StixInstant> accessed) Initializes the optional valueaccessedto accessed.final Directory.Builderaccessed(StixInstant accessed) Initializes the optional valueaccessedto accessed.final Directory.BuilderaddAllExtensions(Iterable<? extends CyberObservableExtension> elements) Adds elements toextensionsset.final Directory.BuilderaddAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.final Directory.BuilderaddAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.final Directory.BuilderaddExtension(CyberObservableExtension element) Adds one element toextensionsset.final Directory.BuilderaddExtensions(CyberObservableExtension... elements) Adds elements toextensionsset.final Directory.BuilderaddGranularMarking(GranularMarkingDm element) Adds one element togranularMarkingsset.final Directory.BuilderaddGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.final Directory.BuilderaddObjectMarkingRef(MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.final Directory.BuilderaddObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.build()Builds a newDirectory.final Directory.Buildercreated(Optional<? extends StixInstant> created) Initializes the optional valuecreatedto created.final Directory.Buildercreated(StixInstant created) Initializes the optional valuecreatedto created.final Directory.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final Directory.Builderdefanged(boolean defanged) Initializes the optional valuedefangedto defanged.final Directory.BuilderInitializes the optional valuedefangedto defanged.final Directory.Builderextensions(Iterable<? extends CyberObservableExtension> elements) Sets or replaces all elements forextensionsset.final Directory.Builderfrom(BundleableObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.final Directory.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final Directory.Builderfrom(CyberObservableObjectCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.CyberObservableObjectCommonPropertiesinstance.final Directory.Builderfrom(DirectoryCoo instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.DirectoryCooinstance.final Directory.BuildergranularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.final Directory.Builderhydrated(boolean hydrated) Initializes the value for thehydratedattribute.final Directory.Buildermodified(Optional<? extends StixInstant> modified) Initializes the optional valuemodifiedto modified.final Directory.Buildermodified(StixInstant modified) Initializes the optional valuemodifiedto modified.final Directory.BuilderobjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.final Directory.BuilderobservableObjectKey(String observableObjectKey) Initializes the value for theobservableObjectKeyattribute.final Directory.BuilderInitializes the value for thepathattribute.final Directory.BuilderInitializes the optional valuepathEncto pathEnc.final Directory.BuilderInitializes the optional valuepathEncto pathEnc.final Directory.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final Directory.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final Directory.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final Directory.BuildertoJsonString(String toJsonString) Initializes the value for thetoJsonStringattribute.final Directory.BuilderInitializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final Directory.Builder from(CyberObservableObjectCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.CyberObservableObjectCommonPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.DirectoryCooinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
path
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the path, as originally observed, to the directory on the file system.") public final Directory.Builder path(String path) Initializes the value for thepathattribute.- Parameters:
path- The value for path (can benull)- Returns:
thisbuilder for use in a chained invocation
-
pathEnc
Initializes the optional valuepathEncto pathEnc.- Parameters:
pathEnc- The value for pathEnc- Returns:
thisbuilder for chained invocation
-
pathEnc
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the observed encoding for the path.") public final Directory.Builder pathEnc(Optional<String> pathEnc) Initializes the optional valuepathEncto pathEnc.- Parameters:
pathEnc- The value for pathEnc- Returns:
thisbuilder for use in a chained invocation
-
created
Initializes the optional valuecreatedto created.- Parameters:
created- The value for created- Returns:
thisbuilder for chained invocation
-
created
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the date/time the directory was created.") public final Directory.Builder created(Optional<? extends StixInstant> created) Initializes the optional valuecreatedto created.- Parameters:
created- The value for created- Returns:
thisbuilder for use in a chained invocation
-
modified
Initializes the optional valuemodifiedto modified.- Parameters:
modified- The value for modified- Returns:
thisbuilder for chained invocation
-
modified
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the date/time the directory was last written to/modified.") public final Directory.Builder modified(Optional<? extends StixInstant> modified) Initializes the optional valuemodifiedto modified.- Parameters:
modified- The value for modified- Returns:
thisbuilder for use in a chained invocation
-
accessed
Initializes the optional valueaccessedto accessed.- Parameters:
accessed- The value for accessed- Returns:
thisbuilder for chained invocation
-
accessed
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the date/time the directory was last accessed.") public final Directory.Builder accessed(Optional<? extends StixInstant> accessed) Initializes the optional valueaccessedto accessed.- Parameters:
accessed- The value for accessed- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addExtension
@CanIgnoreReturnValue public final Directory.Builder addExtension(@Nullable CyberObservableExtension element) Adds one element toextensionsset.- Parameters:
element- A extensions element- Returns:
thisbuilder for use in a chained invocation
-
addExtensions
@CanIgnoreReturnValue public final Directory.Builder addExtensions(CyberObservableExtension... elements) Adds elements toextensionsset.- Parameters:
elements- An array of extensions elements- Returns:
thisbuilder for use in a chained invocation
-
extensions
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies any extensions of the object, as a dictionary.") public final Directory.Builder extensions(Iterable<? extends CyberObservableExtension> elements) Sets or replaces all elements forextensionsset.- Parameters:
elements- An iterable of extensions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExtensions
@CanIgnoreReturnValue public final Directory.Builder addAllExtensions(Iterable<? extends CyberObservableExtension> elements) Adds elements toextensionsset.- Parameters:
elements- An iterable of extensions elements- Returns:
thisbuilder for use in a chained invocation
-
observableObjectKey
@CanIgnoreReturnValue public final Directory.Builder observableObjectKey(String observableObjectKey) Initializes the value for theobservableObjectKeyattribute.If not set, this attribute will have a default value as returned by the initializer of
observableObjectKey.- Parameters:
observableObjectKey- The value for observableObjectKey- Returns:
thisbuilder for use in a chained invocation
-
defanged
Initializes the optional valuedefangedto defanged.- Parameters:
defanged- The value for defanged- Returns:
thisbuilder for chained invocation
-
defanged
@CanIgnoreReturnValue @JsonPropertyDescription("Indicates whether the data contained in the SCO has been defanged.") public final Directory.Builder defanged(Optional<Boolean> defanged) Initializes the optional valuedefangedto defanged.- Parameters:
defanged- The value for defanged- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
Put one entry to thecustomPropertiesmap.- Parameters:
key- The key in the customProperties mapvalue- The associated value in the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putCustomProperty
@CanIgnoreReturnValue public final Directory.Builder putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
customProperties
@CanIgnoreReturnValue public final Directory.Builder customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
putAllCustomProperties
@CanIgnoreReturnValue public final Directory.Builder putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the customProperties map- Returns:
thisbuilder for use in a chained invocation
-
addObjectMarkingRef
@CanIgnoreReturnValue public final Directory.Builder addObjectMarkingRef(@Nullable MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.- Parameters:
element- A objectMarkingRefs element- Returns:
thisbuilder for use in a chained invocation
-
addObjectMarkingRefs
@CanIgnoreReturnValue public final Directory.Builder addObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.- Parameters:
elements- An array of objectMarkingRefs elements- Returns:
thisbuilder for use in a chained invocation
-
objectMarkingRefs
@CanIgnoreReturnValue public final Directory.Builder objectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.- Parameters:
elements- An iterable of objectMarkingRefs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllObjectMarkingRefs
@CanIgnoreReturnValue public final Directory.Builder addAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.- Parameters:
elements- An iterable of objectMarkingRefs elements- Returns:
thisbuilder for use in a chained invocation
-
addGranularMarking
@CanIgnoreReturnValue public final Directory.Builder addGranularMarking(@Nullable GranularMarkingDm element) Adds one element togranularMarkingsset.- Parameters:
element- A granularMarkings element- Returns:
thisbuilder for use in a chained invocation
-
addGranularMarkings
@CanIgnoreReturnValue public final Directory.Builder addGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.- Parameters:
elements- An array of granularMarkings elements- Returns:
thisbuilder for use in a chained invocation
-
granularMarkings
@CanIgnoreReturnValue public final Directory.Builder granularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.- Parameters:
elements- An iterable of granularMarkings elements- Returns:
thisbuilder for use in a chained invocation
-
addAllGranularMarkings
@CanIgnoreReturnValue public final Directory.Builder addAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.- Parameters:
elements- An iterable of granularMarkings elements- Returns:
thisbuilder for use in a chained invocation
-
hydrated
Initializes the value for thehydratedattribute.- Parameters:
hydrated- The value for hydrated- Returns:
thisbuilder for use in a chained invocation
-
toJsonString
Initializes the value for thetoJsonStringattribute.- Parameters:
toJsonString- The value for toJsonString (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newDirectory.- Returns:
- An immutable instance of Directory
- Throws:
IllegalStateException- if any required attributes are missing
-