Class Location.Builder
java.lang.Object
security.whisper.javastix.sdo.objects.Location.Builder
- Enclosing class:
Location
-
Method Summary
Modifier and TypeMethodDescriptionfinal Location.BuilderaddAllExternalReferences(Iterable<? extends ExternalReferenceType> elements) Adds elements toexternalReferencesset.final Location.BuilderaddAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.final Location.BuilderaddAllLabels(Iterable<String> elements) Adds elements tolabelsset.final Location.BuilderaddAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.final Location.BuilderaddAllRelationships(Iterable<? extends RelationshipSro> elements) Adds elements torelationshipsset.final Location.BuilderAdds one element toexternalReferencesset.final Location.BuilderaddExternalReferences(ExternalReferenceType... elements) Adds elements toexternalReferencesset.final Location.BuilderaddGranularMarking(GranularMarkingDm element) Adds one element togranularMarkingsset.final Location.BuilderaddGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.final Location.BuilderAdds one element tolabelsset.final Location.BuilderAdds elements tolabelsset.final Location.BuilderaddObjectMarkingRef(MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.final Location.BuilderaddObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.final Location.BuilderaddRelationship(RelationshipSro element) Adds one element torelationshipsset.final Location.BuilderaddRelationships(RelationshipSro... elements) Adds elements torelationshipsset.final Location.BuilderadministrativeArea(String administrativeArea) Initializes the optional valueadministrativeAreato administrativeArea.final Location.BuilderadministrativeArea(Optional<String> administrativeArea) Initializes the optional valueadministrativeAreato administrativeArea.build()Builds a newLocation.final Location.BuilderInitializes the optional valuecityto city.final Location.BuilderInitializes the optional valuecityto city.final Location.BuilderInitializes the optional valuecountryto country.final Location.BuilderInitializes the optional valuecountryto country.final Location.Buildercreated(StixInstant created) Initializes the value for thecreatedattribute.final Location.BuildercreatedByRef(Optional<? extends IdentitySdo> createdByRef) Initializes the optional valuecreatedByRefto createdByRef.final Location.BuildercreatedByRef(IdentitySdo createdByRef) Initializes the optional valuecreatedByRefto createdByRef.final Location.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final Location.Builderdescription(String description) Initializes the optional valuedescriptionto description.final Location.Builderdescription(Optional<String> description) Initializes the optional valuedescriptionto description.final Location.BuilderexternalReferences(Iterable<? extends ExternalReferenceType> elements) Sets or replaces all elements forexternalReferencesset.final Location.Builderfrom(BundleableObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.final Location.Builderfrom(StixCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCommonPropertiesinstance.final Location.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final Location.Builderfrom(StixLabels instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixLabelsinstance.final Location.Builderfrom(StixModified instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixModifiedinstance.final Location.Builderfrom(StixRevoked instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixRevokedinstance.final Location.Builderfrom(DomainObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.sdo.DomainObjectinstance.final Location.Builderfrom(LocationSdo instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.sdo.objects.LocationSdoinstance.final Location.BuildergranularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.final Location.Builderhydrated(boolean hydrated) Initializes the value for thehydratedattribute.final Location.BuilderInitializes the value for theidattribute.final Location.BuilderSets or replaces all elements forlabelsset.final Location.BuilderInitializes the optional valuelangto lang.final Location.BuilderInitializes the optional valuelangto lang.final Location.Builderlatitude(double latitude) Initializes the optional valuelatitudeto latitude.final Location.BuilderInitializes the optional valuelatitudeto latitude.final Location.Builderlongitude(double longitude) Initializes the optional valuelongitudeto longitude.final Location.BuilderInitializes the optional valuelongitudeto longitude.final Location.Buildermodified(StixInstant modified) Initializes the value for themodifiedattribute.final Location.BuilderInitializes the optional valuenameto name.final Location.BuilderInitializes the optional valuenameto name.final Location.BuilderobjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.final Location.BuilderpostalCode(String postalCode) Initializes the optional valuepostalCodeto postalCode.final Location.BuilderpostalCode(Optional<String> postalCode) Initializes the optional valuepostalCodeto postalCode.final Location.Builderprecision(double precision) Initializes the optional valueprecisionto precision.final Location.BuilderInitializes the optional valueprecisionto precision.final Location.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final Location.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final Location.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final Location.BuilderInitializes the optional valueregionto region.final Location.BuilderInitializes the optional valueregionto region.final Location.Builderrelationships(Iterable<? extends RelationshipSro> elements) Sets or replaces all elements forrelationshipsset.final Location.Builderrevoked(StixBoolean revoked) Initializes the value for therevokedattribute.final Location.BuilderstreetAddress(String streetAddress) Initializes the optional valuestreetAddressto streetAddress.final Location.BuilderstreetAddress(Optional<String> streetAddress) Initializes the optional valuestreetAddressto streetAddress.final Location.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.StixCommonPropertiesinstance.- 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.StixRevokedinstance.- 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.sdo.objects.LocationSdoinstance.- 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
Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixLabelsinstance.- 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.StixModifiedinstance.- 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.sdo.DomainObjectinstance.- Parameters:
instance- The instance from which to copy values- 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("A name used to identify the Location.") public final Location.Builder name(Optional<String> name) Initializes the optional valuenameto name.- Parameters:
name- The value for name- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for chained invocation
-
description
@CanIgnoreReturnValue @JsonPropertyDescription("A textual description of the Location.") public final Location.Builder description(Optional<String> description) Initializes the optional valuedescriptionto description.- Parameters:
description- The value for description- Returns:
thisbuilder for use in a chained invocation
-
latitude
Initializes the optional valuelatitudeto latitude.- Parameters:
latitude- The value for latitude- Returns:
thisbuilder for chained invocation
-
latitude
@CanIgnoreReturnValue @JsonPropertyDescription("The latitude of the Location in decimal degrees.") public final Location.Builder latitude(Optional<Double> latitude) Initializes the optional valuelatitudeto latitude.- Parameters:
latitude- The value for latitude- Returns:
thisbuilder for use in a chained invocation
-
longitude
Initializes the optional valuelongitudeto longitude.- Parameters:
longitude- The value for longitude- Returns:
thisbuilder for chained invocation
-
longitude
@CanIgnoreReturnValue @JsonPropertyDescription("The longitude of the Location in decimal degrees.") public final Location.Builder longitude(Optional<Double> longitude) Initializes the optional valuelongitudeto longitude.- Parameters:
longitude- The value for longitude- Returns:
thisbuilder for use in a chained invocation
-
precision
Initializes the optional valueprecisionto precision.- Parameters:
precision- The value for precision- Returns:
thisbuilder for chained invocation
-
precision
@CanIgnoreReturnValue @JsonPropertyDescription("Defines the precision of the coordinates specified by the latitude and longitude properties in meters.") public final Location.Builder precision(Optional<Double> precision) Initializes the optional valueprecisionto precision.- Parameters:
precision- The value for precision- Returns:
thisbuilder for use in a chained invocation
-
region
Initializes the optional valueregionto region.- Parameters:
region- The value for region- Returns:
thisbuilder for chained invocation
-
region
@CanIgnoreReturnValue @JsonPropertyDescription("The region that this Location describes. Open Vocabulary: region-ov") public final Location.Builder region(Optional<String> region) Initializes the optional valueregionto region.- Parameters:
region- The value for region- Returns:
thisbuilder for use in a chained invocation
-
country
Initializes the optional valuecountryto country.- Parameters:
country- The value for country- Returns:
thisbuilder for chained invocation
-
country
@CanIgnoreReturnValue @JsonPropertyDescription("The country that this Location describes (ISO 3166-1 ALPHA-2 Code).") public final Location.Builder country(Optional<String> country) Initializes the optional valuecountryto country.- Parameters:
country- The value for country- Returns:
thisbuilder for use in a chained invocation
-
administrativeArea
Initializes the optional valueadministrativeAreato administrativeArea.- Parameters:
administrativeArea- The value for administrativeArea- Returns:
thisbuilder for chained invocation
-
administrativeArea
@CanIgnoreReturnValue @JsonPropertyDescription("The state, province, or other sub-national administrative area that this Location describes.") public final Location.Builder administrativeArea(Optional<String> administrativeArea) Initializes the optional valueadministrativeAreato administrativeArea.- Parameters:
administrativeArea- The value for administrativeArea- Returns:
thisbuilder for use in a chained invocation
-
city
Initializes the optional valuecityto city.- Parameters:
city- The value for city- Returns:
thisbuilder for chained invocation
-
city
@CanIgnoreReturnValue @JsonPropertyDescription("The city that this Location describes.") public final Location.Builder city(Optional<String> city) Initializes the optional valuecityto city.- Parameters:
city- The value for city- Returns:
thisbuilder for use in a chained invocation
-
streetAddress
Initializes the optional valuestreetAddressto streetAddress.- Parameters:
streetAddress- The value for streetAddress- Returns:
thisbuilder for chained invocation
-
streetAddress
@CanIgnoreReturnValue @JsonPropertyDescription("The street address that this Location describes.") public final Location.Builder streetAddress(Optional<String> streetAddress) Initializes the optional valuestreetAddressto streetAddress.- Parameters:
streetAddress- The value for streetAddress- Returns:
thisbuilder for use in a chained invocation
-
postalCode
Initializes the optional valuepostalCodeto postalCode.- Parameters:
postalCode- The value for postalCode- Returns:
thisbuilder for chained invocation
-
postalCode
@CanIgnoreReturnValue @JsonPropertyDescription("The postal code for this Location.") public final Location.Builder postalCode(Optional<String> postalCode) Initializes the optional valuepostalCodeto postalCode.- Parameters:
postalCode- The value for postalCode- Returns:
thisbuilder for use in a chained invocation
-
addRelationship
@CanIgnoreReturnValue public final Location.Builder addRelationship(@Nullable RelationshipSro element) Adds one element torelationshipsset.- Parameters:
element- A relationships element- Returns:
thisbuilder for use in a chained invocation
-
addRelationships
Adds elements torelationshipsset.- Parameters:
elements- An array of relationships elements- Returns:
thisbuilder for use in a chained invocation
-
relationships
@CanIgnoreReturnValue public final Location.Builder relationships(Iterable<? extends RelationshipSro> elements) Sets or replaces all elements forrelationshipsset.- Parameters:
elements- An iterable of relationships elements- Returns:
thisbuilder for use in a chained invocation
-
addAllRelationships
@CanIgnoreReturnValue public final Location.Builder addAllRelationships(Iterable<? extends RelationshipSro> elements) Adds elements torelationshipsset.- Parameters:
elements- An iterable of relationships elements- Returns:
thisbuilder for use in a chained invocation
-
hydrated
Initializes the value for thehydratedattribute.If not set, this attribute will have a default value as returned by the initializer of
hydrated.- Parameters:
hydrated- The value for hydrated- Returns:
thisbuilder for use in a chained invocation
-
type
@CanIgnoreReturnValue @JsonPropertyDescription("The type property identifies the type of STIX Object (SDO, Relationship Object, etc). The value of the type field MUST be one of the types defined by a STIX Object (e.g., indicator).") public final Location.Builder type(String type) Initializes the value for thetypeattribute.- Parameters:
type- The value for type (can benull)- Returns:
thisbuilder for use in a chained invocation
-
id
@CanIgnoreReturnValue @JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") public final Location.Builder id(String id) Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
createdByRef
Initializes the optional valuecreatedByRefto createdByRef.- Parameters:
createdByRef- The value for createdByRef- Returns:
thisbuilder for chained invocation
-
createdByRef
@CanIgnoreReturnValue @JsonPropertyDescription("Represents identifiers across the CTI specifications. The format consists of the name of the top-level object being identified, followed by two dashes (--), followed by a UUIDv4.") public final Location.Builder createdByRef(Optional<? extends IdentitySdo> createdByRef) Initializes the optional valuecreatedByRefto createdByRef.- Parameters:
createdByRef- The value for createdByRef- Returns:
thisbuilder for use in a chained invocation
-
created
@CanIgnoreReturnValue @JsonPropertyDescription("The created property represents the time at which the first version of this object was created. The timstamp value MUST be precise to the nearest millisecond.") public final Location.Builder created(StixInstant created) Initializes the value for thecreatedattribute.If not set, this attribute will have a default value as returned by the initializer of
created.- Parameters:
created- The value for created- Returns:
thisbuilder for use in a chained invocation
-
lang
Initializes the optional valuelangto lang.- Parameters:
lang- The value for lang- Returns:
thisbuilder for chained invocation
-
lang
@CanIgnoreReturnValue @JsonPropertyDescription("Identifies the language of the text content in this object using ISO 639-2 language codes.") public final Location.Builder lang(Optional<String> lang) Initializes the optional valuelangto lang.- Parameters:
lang- The value for lang- Returns:
thisbuilder for use in a chained invocation
-
addExternalReference
@CanIgnoreReturnValue public final Location.Builder addExternalReference(@Nullable ExternalReferenceType element) Adds one element toexternalReferencesset.- Parameters:
element- A externalReferences element- Returns:
thisbuilder for use in a chained invocation
-
addExternalReferences
@CanIgnoreReturnValue public final Location.Builder addExternalReferences(ExternalReferenceType... elements) Adds elements toexternalReferencesset.- Parameters:
elements- An array of externalReferences elements- Returns:
thisbuilder for use in a chained invocation
-
externalReferences
@CanIgnoreReturnValue @JsonPropertyDescription("A list of external references which refers to non-STIX information.") public final Location.Builder externalReferences(Iterable<? extends ExternalReferenceType> elements) Sets or replaces all elements forexternalReferencesset.- Parameters:
elements- An iterable of externalReferences elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExternalReferences
@CanIgnoreReturnValue public final Location.Builder addAllExternalReferences(Iterable<? extends ExternalReferenceType> elements) Adds elements toexternalReferencesset.- Parameters:
elements- An iterable of externalReferences elements- Returns:
thisbuilder for use in a chained invocation
-
addObjectMarkingRef
@CanIgnoreReturnValue public final Location.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 Location.Builder addObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.- Parameters:
elements- An array of objectMarkingRefs elements- Returns:
thisbuilder for use in a chained invocation
-
objectMarkingRefs
@CanIgnoreReturnValue @JsonPropertyDescription("The list of marking-definition objects to be applied to this object.") public final Location.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 Location.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 Location.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 Location.Builder addGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.- Parameters:
elements- An array of granularMarkings elements- Returns:
thisbuilder for use in a chained invocation
-
granularMarkings
@CanIgnoreReturnValue @JsonPropertyDescription("The set of granular markings that apply to this object.") public final Location.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 Location.Builder addAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.- Parameters:
elements- An iterable of granularMarkings elements- 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 Location.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 Location.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 Location.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
-
addLabel
Adds one element tolabelsset.- Parameters:
element- A labels element- Returns:
thisbuilder for use in a chained invocation
-
addLabels
Adds elements tolabelsset.- Parameters:
elements- An array of labels elements- Returns:
thisbuilder for use in a chained invocation
-
labels
@CanIgnoreReturnValue @JsonPropertyDescription("The labels property specifies a set of classifications.") public final Location.Builder labels(Iterable<String> elements) Sets or replaces all elements forlabelsset.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLabels
Adds elements tolabelsset.- Parameters:
elements- An iterable of labels elements- Returns:
thisbuilder for use in a chained invocation
-
modified
@CanIgnoreReturnValue @JsonPropertyDescription("The modified property represents the time that this particular version of the object was created. The timstamp value MUST be precise to the nearest millisecond.") public final Location.Builder modified(StixInstant modified) Initializes the value for themodifiedattribute.If not set, this attribute will have a default value as returned by the initializer of
modified.- Parameters:
modified- The value for modified- Returns:
thisbuilder for use in a chained invocation
-
revoked
@CanIgnoreReturnValue @JsonPropertyDescription("The revoked property indicates whether the object has been revoked.") public final Location.Builder revoked(StixBoolean revoked) Initializes the value for therevokedattribute.If not set, this attribute will have a default value as returned by the initializer of
revoked.- Parameters:
revoked- The value for revoked- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newLocation.- Returns:
- An immutable instance of Location
- Throws:
IllegalStateException- if any required attributes are missing
-