Class UserAccount.Builder
java.lang.Object
security.whisper.javastix.coo.objects.UserAccount.Builder
- Enclosing class:
UserAccount
Builds instances of type
UserAccount.
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 UserAccount.BuilderaccountCreated(Optional<? extends StixInstant> accountCreated) Initializes the optional valueaccountCreatedto accountCreated.final UserAccount.BuilderaccountCreated(StixInstant accountCreated) Initializes the optional valueaccountCreatedto accountCreated.final UserAccount.BuilderaccountExpires(Optional<? extends StixInstant> accountExpires) Initializes the optional valueaccountExpiresto accountExpires.final UserAccount.BuilderaccountExpires(StixInstant accountExpires) Initializes the optional valueaccountExpiresto accountExpires.final UserAccount.BuilderaccountFirstLogin(Optional<? extends StixInstant> accountFirstLogin) Initializes the optional valueaccountFirstLoginto accountFirstLogin.final UserAccount.BuilderaccountFirstLogin(StixInstant accountFirstLogin) Initializes the optional valueaccountFirstLoginto accountFirstLogin.final UserAccount.BuilderaccountLastLogin(Optional<? extends StixInstant> accountLastLogin) Initializes the optional valueaccountLastLoginto accountLastLogin.final UserAccount.BuilderaccountLastLogin(StixInstant accountLastLogin) Initializes the optional valueaccountLastLoginto accountLastLogin.final UserAccount.BuilderaccountLogin(String accountLogin) Initializes the optional valueaccountLoginto accountLogin.final UserAccount.BuilderaccountLogin(Optional<String> accountLogin) Initializes the optional valueaccountLoginto accountLogin.final UserAccount.BuilderaccountType(String accountType) Initializes the optional valueaccountTypeto accountType.final UserAccount.BuilderaccountType(Optional<String> accountType) Initializes the optional valueaccountTypeto accountType.final UserAccount.BuilderaddAllExtensions(Iterable<? extends CyberObservableExtension> elements) Adds elements toextensionsset.final UserAccount.BuilderaddAllGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Adds elements togranularMarkingsset.final UserAccount.BuilderaddAllObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Adds elements toobjectMarkingRefsset.final UserAccount.BuilderaddExtension(CyberObservableExtension element) Adds one element toextensionsset.final UserAccount.BuilderaddExtensions(CyberObservableExtension... elements) Adds elements toextensionsset.final UserAccount.BuilderaddGranularMarking(GranularMarkingDm element) Adds one element togranularMarkingsset.final UserAccount.BuilderaddGranularMarkings(GranularMarkingDm... elements) Adds elements togranularMarkingsset.final UserAccount.BuilderaddObjectMarkingRef(MarkingDefinitionDm element) Adds one element toobjectMarkingRefsset.final UserAccount.BuilderaddObjectMarkingRefs(MarkingDefinitionDm... elements) Adds elements toobjectMarkingRefsset.build()Builds a newUserAccount.final UserAccount.BuildercustomProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.final UserAccount.Builderdefanged(boolean defanged) Initializes the optional valuedefangedto defanged.final UserAccount.BuilderInitializes the optional valuedefangedto defanged.final UserAccount.BuilderdisplayName(String displayName) Initializes the optional valuedisplayNameto displayName.final UserAccount.BuilderdisplayName(Optional<String> displayName) Initializes the optional valuedisplayNameto displayName.final UserAccount.Builderextensions(Iterable<? extends CyberObservableExtension> elements) Sets or replaces all elements forextensionsset.final UserAccount.Builderfrom(BundleableObject instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.bundle.BundleableObjectinstance.final UserAccount.Builderfrom(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.final UserAccount.Builderfrom(CyberObservableObjectCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.CyberObservableObjectCommonPropertiesinstance.final UserAccount.Builderfrom(UserAccountCoo instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.UserAccountCooinstance.final UserAccount.BuildergranularMarkings(Iterable<? extends GranularMarkingDm> elements) Sets or replaces all elements forgranularMarkingsset.final UserAccount.Builderhydrated(boolean hydrated) Initializes the value for thehydratedattribute.final UserAccount.BuilderisCanEscalatePrivs(boolean isCanEscalatePrivs) Initializes the optional valueisCanEscalatePrivsto isCanEscalatePrivs.final UserAccount.BuilderisCanEscalatePrivs(Optional<Boolean> isCanEscalatePrivs) Initializes the optional valueisCanEscalatePrivsto isCanEscalatePrivs.final UserAccount.BuilderisDisabled(boolean isDisabled) Initializes the optional valueisDisabledto isDisabled.final UserAccount.BuilderisDisabled(Optional<Boolean> isDisabled) Initializes the optional valueisDisabledto isDisabled.final UserAccount.BuilderisPrivileged(boolean isPrivileged) Initializes the optional valueisPrivilegedto isPrivileged.final UserAccount.BuilderisPrivileged(Optional<Boolean> isPrivileged) Initializes the optional valueisPrivilegedto isPrivileged.final UserAccount.BuilderisServiceAccount(boolean isServiceAccount) Initializes the optional valueisServiceAccountto isServiceAccount.final UserAccount.BuilderisServiceAccount(Optional<Boolean> isServiceAccount) Initializes the optional valueisServiceAccountto isServiceAccount.final UserAccount.BuilderobjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Sets or replaces all elements forobjectMarkingRefsset.final UserAccount.BuilderobservableObjectKey(String observableObjectKey) Initializes the value for theobservableObjectKeyattribute.final UserAccount.BuilderpasswordLastChanged(Optional<? extends StixInstant> passwordLastChanged) Initializes the optional valuepasswordLastChangedto passwordLastChanged.final UserAccount.BuilderpasswordLastChanged(StixInstant passwordLastChanged) Initializes the optional valuepasswordLastChangedto passwordLastChanged.final UserAccount.BuilderputAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.final UserAccount.BuilderputCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.final UserAccount.BuilderputCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.final UserAccount.BuildertoJsonString(String toJsonString) Initializes the value for thetoJsonStringattribute.final UserAccount.BuilderInitializes the value for thetypeattribute.final UserAccount.BuilderInitializes the value for theuserIdattribute.
-
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
Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.objects.UserAccountCooinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final UserAccount.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
-
userId
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the identifier of the account.") public final UserAccount.Builder userId(String userId) Initializes the value for theuserIdattribute.- Parameters:
userId- The value for userId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
accountLogin
Initializes the optional valueaccountLoginto accountLogin.- Parameters:
accountLogin- The value for accountLogin- Returns:
thisbuilder for chained invocation
-
accountLogin
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the account login string, used in cases where the user_id property specifies something other than what a user would type when they login.") public final UserAccount.Builder accountLogin(Optional<String> accountLogin) Initializes the optional valueaccountLoginto accountLogin.- Parameters:
accountLogin- The value for accountLogin- Returns:
thisbuilder for use in a chained invocation
-
accountType
Initializes the optional valueaccountTypeto accountType.- Parameters:
accountType- The value for accountType- Returns:
thisbuilder for chained invocation
-
accountType
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of the account. This is an open vocabulary and values SHOULD come from the account-type-ov vocabulary.") public final UserAccount.Builder accountType(Optional<String> accountType) Initializes the optional valueaccountTypeto accountType.- Parameters:
accountType- The value for accountType- Returns:
thisbuilder for use in a chained invocation
-
displayName
Initializes the optional valuedisplayNameto displayName.- Parameters:
displayName- The value for displayName- Returns:
thisbuilder for chained invocation
-
displayName
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the display name of the account, to be shown in user interfaces, if applicable.") public final UserAccount.Builder displayName(Optional<String> displayName) Initializes the optional valuedisplayNameto displayName.- Parameters:
displayName- The value for displayName- Returns:
thisbuilder for use in a chained invocation
-
isServiceAccount
Initializes the optional valueisServiceAccountto isServiceAccount.- Parameters:
isServiceAccount- The value for isServiceAccount- Returns:
thisbuilder for chained invocation
-
isServiceAccount
@CanIgnoreReturnValue @JsonPropertyDescription("Indicates that the account is associated with a network service or system process (daemon), not a specific individual.") public final UserAccount.Builder isServiceAccount(Optional<Boolean> isServiceAccount) Initializes the optional valueisServiceAccountto isServiceAccount.- Parameters:
isServiceAccount- The value for isServiceAccount- Returns:
thisbuilder for use in a chained invocation
-
isPrivileged
Initializes the optional valueisPrivilegedto isPrivileged.- Parameters:
isPrivileged- The value for isPrivileged- Returns:
thisbuilder for chained invocation
-
isPrivileged
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies that the account has elevated privileges (i.e., in the case of root on Unix or the Windows Administrator account).") public final UserAccount.Builder isPrivileged(Optional<Boolean> isPrivileged) Initializes the optional valueisPrivilegedto isPrivileged.- Parameters:
isPrivileged- The value for isPrivileged- Returns:
thisbuilder for use in a chained invocation
-
isCanEscalatePrivs
@CanIgnoreReturnValue public final UserAccount.Builder isCanEscalatePrivs(boolean isCanEscalatePrivs) Initializes the optional valueisCanEscalatePrivsto isCanEscalatePrivs.- Parameters:
isCanEscalatePrivs- The value for isCanEscalatePrivs- Returns:
thisbuilder for chained invocation
-
isCanEscalatePrivs
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies that the account has the ability to escalate privileges (i.e., in the case of sudo on Unix or a Windows Domain Admin account).") public final UserAccount.Builder isCanEscalatePrivs(Optional<Boolean> isCanEscalatePrivs) Initializes the optional valueisCanEscalatePrivsto isCanEscalatePrivs.- Parameters:
isCanEscalatePrivs- The value for isCanEscalatePrivs- Returns:
thisbuilder for use in a chained invocation
-
isDisabled
Initializes the optional valueisDisabledto isDisabled.- Parameters:
isDisabled- The value for isDisabled- Returns:
thisbuilder for chained invocation
-
isDisabled
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies if the account is disabled.") public final UserAccount.Builder isDisabled(Optional<Boolean> isDisabled) Initializes the optional valueisDisabledto isDisabled.- Parameters:
isDisabled- The value for isDisabled- Returns:
thisbuilder for use in a chained invocation
-
accountCreated
Initializes the optional valueaccountCreatedto accountCreated.- Parameters:
accountCreated- The value for accountCreated- Returns:
thisbuilder for chained invocation
-
accountCreated
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies when the account was created.") public final UserAccount.Builder accountCreated(Optional<? extends StixInstant> accountCreated) Initializes the optional valueaccountCreatedto accountCreated.- Parameters:
accountCreated- The value for accountCreated- Returns:
thisbuilder for use in a chained invocation
-
accountExpires
Initializes the optional valueaccountExpiresto accountExpires.- Parameters:
accountExpires- The value for accountExpires- Returns:
thisbuilder for chained invocation
-
accountExpires
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the expiration date of the account.") public final UserAccount.Builder accountExpires(Optional<? extends StixInstant> accountExpires) Initializes the optional valueaccountExpiresto accountExpires.- Parameters:
accountExpires- The value for accountExpires- Returns:
thisbuilder for use in a chained invocation
-
passwordLastChanged
@CanIgnoreReturnValue public final UserAccount.Builder passwordLastChanged(StixInstant passwordLastChanged) Initializes the optional valuepasswordLastChangedto passwordLastChanged.- Parameters:
passwordLastChanged- The value for passwordLastChanged- Returns:
thisbuilder for chained invocation
-
passwordLastChanged
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies when the account password was last changed.") public final UserAccount.Builder passwordLastChanged(Optional<? extends StixInstant> passwordLastChanged) Initializes the optional valuepasswordLastChangedto passwordLastChanged.- Parameters:
passwordLastChanged- The value for passwordLastChanged- Returns:
thisbuilder for use in a chained invocation
-
accountFirstLogin
@CanIgnoreReturnValue public final UserAccount.Builder accountFirstLogin(StixInstant accountFirstLogin) Initializes the optional valueaccountFirstLoginto accountFirstLogin.- Parameters:
accountFirstLogin- The value for accountFirstLogin- Returns:
thisbuilder for chained invocation
-
accountFirstLogin
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies when the account was first accessed.") public final UserAccount.Builder accountFirstLogin(Optional<? extends StixInstant> accountFirstLogin) Initializes the optional valueaccountFirstLoginto accountFirstLogin.- Parameters:
accountFirstLogin- The value for accountFirstLogin- Returns:
thisbuilder for use in a chained invocation
-
accountLastLogin
@CanIgnoreReturnValue public final UserAccount.Builder accountLastLogin(StixInstant accountLastLogin) Initializes the optional valueaccountLastLoginto accountLastLogin.- Parameters:
accountLastLogin- The value for accountLastLogin- Returns:
thisbuilder for chained invocation
-
accountLastLogin
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies when the account was last accessed.") public final UserAccount.Builder accountLastLogin(Optional<? extends StixInstant> accountLastLogin) Initializes the optional valueaccountLastLoginto accountLastLogin.- Parameters:
accountLastLogin- The value for accountLastLogin- 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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 UserAccount.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 newUserAccount.- Returns:
- An immutable instance of UserAccount
- Throws:
IllegalStateException- if any required attributes are missing
-