Class AutonomousSystem.Builder
java.lang.Object
security.whisper.javastix.coo.objects.AutonomousSystem.Builder
- Enclosing class:
AutonomousSystem
Builds instances of type
AutonomousSystem.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionfinal AutonomousSystem.BuilderaddAllExtensions(Iterable<? extends CyberObservableExtension> elements) Adds elements toextensionsset.final AutonomousSystem.BuilderaddAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.final AutonomousSystem.BuilderaddAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.final AutonomousSystem.BuilderaddExtension(CyberObservableExtension element) Adds one element toextensionsset.final AutonomousSystem.BuilderaddExtensions(CyberObservableExtension... elements) Adds elements toextensionsset.final AutonomousSystem.BuilderaddGranularMarking(GranularMarkingDm element) Adds one element togranularMarkingsset.final AutonomousSystem.BuilderaddGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.final AutonomousSystem.BuilderaddObjectMarkingRef(MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.final AutonomousSystem.BuilderaddObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.build()Builds a newAutonomousSystem.final AutonomousSystem.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final AutonomousSystem.Builderdefanged(boolean defanged) Initializes the optional valuedefangedto defanged.final AutonomousSystem.BuilderInitializes the optional valuedefangedto defanged.final AutonomousSystem.Builderextensions(Iterable<? extends CyberObservableExtension> elements) Sets or replaces all elements forextensionsset.final AutonomousSystem.Builderfrom(BundleableObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.final AutonomousSystem.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final AutonomousSystem.Builderfrom(CyberObservableObjectCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.CyberObservableObjectCommonPropertiesinstance.final AutonomousSystem.Builderfrom(AutonomousSystemCoo instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.AutonomousSystemCooinstance.final AutonomousSystem.BuildergranularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.final AutonomousSystem.Builderhydrated(boolean hydrated) Initializes the value for thehydratedattribute.final AutonomousSystem.BuilderInitializes the optional valuenameto name.final AutonomousSystem.BuilderInitializes the optional valuenameto name.final AutonomousSystem.BuilderInitializes the value for thenumberattribute.final AutonomousSystem.BuilderobjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.final AutonomousSystem.BuilderobservableObjectKey(String observableObjectKey) Initializes the value for theobservableObjectKeyattribute.final AutonomousSystem.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final AutonomousSystem.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final AutonomousSystem.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final AutonomousSystem.BuilderInitializes the optional valuerirto rir.final AutonomousSystem.BuilderInitializes the optional valuerirto rir.final AutonomousSystem.BuildertoJsonString(String toJsonString) Initializes the value for thetoJsonStringattribute.final AutonomousSystem.BuilderInitializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.AutonomousSystemCooinstance.- 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.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 AutonomousSystem.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
-
number
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the number assigned to the AS. Such assignments are typically performed by a Regional Internet Registries (RIR)") public final AutonomousSystem.Builder number(Long number) Initializes the value for thenumberattribute.- Parameters:
number- The value for number (can benull)- Returns:
thisbuilder for use in a chained invocation
-
name
Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for chained invocation
-
name
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the name of the AS.") public final AutonomousSystem.Builder name(Optional<String> name) Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
rir
Initializes the optional valuerirto rir.- Parameters:
rir- The value for rir- Returns:
thisbuilder for chained invocation
-
rir
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the name of the Regional Internet Registry (RIR) that assigned the number to the AS.") public final AutonomousSystem.Builder rir(Optional<String> rir) Initializes the optional valuerirto rir.- Parameters:
rir- The value for rir- 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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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
@CanIgnoreReturnValue public final AutonomousSystem.Builder putCustomProperty(String key, Object value) 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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 AutonomousSystem.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 newAutonomousSystem.- Returns:
- An immutable instance of AutonomousSystem
- Throws:
IllegalStateException- if any required attributes are missing
-