Class Opinion.Builder
java.lang.Object
security.whisper.javastix.sdo.objects.Opinion.Builder
- Enclosing class:
Opinion
-
Method Summary
Modifier and TypeMethodDescriptionfinal Opinion.BuilderaddAllAuthors(Iterable<String> elements) Adds elements toauthorsset.final Opinion.BuilderaddAllExternalReferences(Iterable<? extends ExternalReferenceType> elements) Adds elements toexternalReferencesset.final Opinion.BuilderaddAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.final Opinion.BuilderaddAllLabels(Iterable<String> elements) Adds elements tolabelsset.final Opinion.BuilderaddAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.final Opinion.BuilderaddAllObjectRefs(Iterable<? extends BundleableObject> elements) Adds elements toobjectRefsset.final Opinion.BuilderaddAllRelationships(Iterable<? extends RelationshipSro> elements) Adds elements torelationshipsset.final Opinion.BuilderAdds one element toauthorsset.final Opinion.BuilderaddAuthors(String... elements) Adds elements toauthorsset.final Opinion.BuilderAdds one element toexternalReferencesset.final Opinion.BuilderaddExternalReferences(ExternalReferenceType... elements) Adds elements toexternalReferencesset.final Opinion.BuilderaddGranularMarking(GranularMarkingDm element) Adds one element togranularMarkingsset.final Opinion.BuilderaddGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.final Opinion.BuilderAdds one element tolabelsset.final Opinion.BuilderAdds elements tolabelsset.final Opinion.BuilderaddObjectMarkingRef(MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.final Opinion.BuilderaddObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.final Opinion.BuilderaddObjectRef(BundleableObject element) Adds one element toobjectRefsset.final Opinion.BuilderaddObjectRefs(BundleableObject... elements) Adds elements toobjectRefsset.final Opinion.BuilderaddRelationship(RelationshipSro element) Adds one element torelationshipsset.final Opinion.BuilderaddRelationships(RelationshipSro... elements) Adds elements torelationshipsset.final Opinion.BuilderSets or replaces all elements forauthorsset.build()Builds a newOpinion.final Opinion.Buildercreated(StixInstant created) Initializes the value for thecreatedattribute.final Opinion.BuildercreatedByRef(Optional<? extends IdentitySdo> createdByRef) Initializes the optional valuecreatedByRefto createdByRef.final Opinion.BuildercreatedByRef(IdentitySdo createdByRef) Initializes the optional valuecreatedByRefto createdByRef.final Opinion.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final Opinion.Builderexplanation(String explanation) Initializes the optional valueexplanationto explanation.final Opinion.Builderexplanation(Optional<String> explanation) Initializes the optional valueexplanationto explanation.final Opinion.BuilderexternalReferences(Iterable<? extends ExternalReferenceType> elements) Sets or replaces all elements forexternalReferencesset.final Opinion.Builderfrom(BundleableObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.final Opinion.Builderfrom(StixCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCommonPropertiesinstance.final Opinion.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final Opinion.Builderfrom(StixLabels instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixLabelsinstance.final Opinion.Builderfrom(StixModified instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixModifiedinstance.final Opinion.Builderfrom(StixRevoked instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixRevokedinstance.final Opinion.Builderfrom(DomainObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.sdo.DomainObjectinstance.final Opinion.Builderfrom(OpinionSdo instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.sdo.objects.OpinionSdoinstance.final Opinion.BuildergranularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.final Opinion.Builderhydrated(boolean hydrated) Initializes the value for thehydratedattribute.final Opinion.BuilderInitializes the value for theidattribute.final Opinion.BuilderSets or replaces all elements forlabelsset.final Opinion.BuilderInitializes the optional valuelangto lang.final Opinion.BuilderInitializes the optional valuelangto lang.final Opinion.Buildermodified(StixInstant modified) Initializes the value for themodifiedattribute.final Opinion.BuilderobjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.final Opinion.BuilderobjectRefs(Iterable<? extends BundleableObject> elements) Sets or replaces all elements forobjectRefsset.final Opinion.BuilderInitializes the value for theopinionattribute.final Opinion.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final Opinion.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final Opinion.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final Opinion.Builderrelationships(Iterable<? extends RelationshipSro> elements) Sets or replaces all elements forrelationshipsset.final Opinion.Builderrevoked(StixBoolean revoked) Initializes the value for therevokedattribute.final Opinion.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.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.objects.OpinionSdoinstance.- 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
-
opinion
@CanIgnoreReturnValue @JsonPropertyDescription("The opinion that the producing organization has about the correctness of the information.") public final Opinion.Builder opinion(String opinion) Initializes the value for theopinionattribute.- Parameters:
opinion- The value for opinion (can benull)- Returns:
thisbuilder for use in a chained invocation
-
explanation
Initializes the optional valueexplanationto explanation.- Parameters:
explanation- The value for explanation- Returns:
thisbuilder for chained invocation
-
explanation
@CanIgnoreReturnValue @JsonPropertyDescription("An explanation of why the producer has this opinion.") public final Opinion.Builder explanation(Optional<String> explanation) Initializes the optional valueexplanationto explanation.- Parameters:
explanation- The value for explanation- Returns:
thisbuilder for use in a chained invocation
-
addAuthor
Adds one element toauthorsset.- Parameters:
element- A authors element- Returns:
thisbuilder for use in a chained invocation
-
addAuthors
Adds elements toauthorsset.- Parameters:
elements- An array of authors elements- Returns:
thisbuilder for use in a chained invocation
-
authors
@CanIgnoreReturnValue @JsonPropertyDescription("The name of the author(s) of this opinion (e.g., the analyst(s) that created it).") public final Opinion.Builder authors(Iterable<String> elements) Sets or replaces all elements forauthorsset.- Parameters:
elements- An iterable of authors elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAuthors
Adds elements toauthorsset.- Parameters:
elements- An iterable of authors elements- Returns:
thisbuilder for use in a chained invocation
-
addObjectRef
Adds one element toobjectRefsset.- Parameters:
element- A objectRefs element- Returns:
thisbuilder for use in a chained invocation
-
addObjectRefs
Adds elements toobjectRefsset.- Parameters:
elements- An array of objectRefs elements- Returns:
thisbuilder for use in a chained invocation
-
objectRefs
@CanIgnoreReturnValue @JsonPropertyDescription("The STIX Objects that this opinion is being applied to.") public final Opinion.Builder objectRefs(Iterable<? extends BundleableObject> elements) Sets or replaces all elements forobjectRefsset.- Parameters:
elements- An iterable of objectRefs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllObjectRefs
@CanIgnoreReturnValue public final Opinion.Builder addAllObjectRefs(Iterable<? extends BundleableObject> elements) Adds elements toobjectRefsset.- Parameters:
elements- An iterable of objectRefs elements- Returns:
thisbuilder for use in a chained invocation
-
addRelationship
@CanIgnoreReturnValue public final Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 Opinion.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 newOpinion.- Returns:
- An immutable instance of Opinion
- Throws:
IllegalStateException- if any required attributes are missing
-