Class UserAccount
java.lang.Object
security.whisper.javastix.coo.objects.UserAccount
- All Implemented Interfaces:
Serializable,BundleableObject,Stix,StixCustomProperties,CyberObservableObject,CyberObservableObjectCommonProperties,UserAccountCoo,GenericValidation,SdoDefaultValidator
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class UserAccount
extends Object
implements UserAccountCoo
user-account
The User Account Object represents an instance of any type of user account, including but not limited to operating system, device, messaging service, and social media platform accounts.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
VALIDATOR -
Method Summary
Modifier and TypeMethodDescriptionstatic UserAccount.Builderbuilder()Creates a builder forUserAccount.static UserAccountcopyOf(UserAccountCoo instance) Creates an immutable copy of aUserAccountCoovalue.booleanThis instance is equal to all instances ofUserAccountthat have equal attribute values.Custom Properties for STIX Objects.Indicates whether the data contained in the SCO has been defanged.com.google.common.collect.ImmutableSet<CyberObservableExtension> Multiple extensions can be added, but only 1 instance of a specific extension can be added.com.google.common.collect.ImmutableSet<GranularMarkingDm> booleangetId()Deterministically generates the ID for this user account based on its user ID.com.google.common.collect.ImmutableSet<MarkingDefinitionDm> Used for generation of Map Keys byManually set this value if you want to control key names.invalid reference
ObservedDataSdo#getObjects()getType()inthashCode()Computes a hash code from attributes:userId,accountLogin,accountType,displayName,isServiceAccount,isPrivileged,isCanEscalatePrivs,isDisabled,accountCreated,accountExpires,passwordLastChanged,accountFirstLogin,accountLastLogin,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString.toString()Prints the immutable valueUserAccountwith attribute values.final UserAccountwithAccountCreated(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theaccountCreatedattribute.final UserAccountwithAccountCreated(StixInstant value) Copy the current immutable object by setting a present value for the optionalaccountCreatedattribute.final UserAccountwithAccountExpires(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theaccountExpiresattribute.final UserAccountwithAccountExpires(StixInstant value) Copy the current immutable object by setting a present value for the optionalaccountExpiresattribute.final UserAccountwithAccountFirstLogin(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theaccountFirstLoginattribute.final UserAccountwithAccountFirstLogin(StixInstant value) Copy the current immutable object by setting a present value for the optionalaccountFirstLoginattribute.final UserAccountwithAccountLastLogin(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for theaccountLastLoginattribute.final UserAccountwithAccountLastLogin(StixInstant value) Copy the current immutable object by setting a present value for the optionalaccountLastLoginattribute.final UserAccountwithAccountLogin(String value) Copy the current immutable object by setting a present value for the optionalaccountLoginattribute.final UserAccountwithAccountLogin(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccountLoginattribute.final UserAccountwithAccountType(String value) Copy the current immutable object by setting a present value for the optionalaccountTypeattribute.final UserAccountwithAccountType(Optional<String> optional) Copy the current immutable object by setting an optional value for theaccountTypeattribute.final UserAccountwithCustomProperties(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thecustomPropertiesmap with the specified map.final UserAccountwithDefanged(boolean value) Copy the current immutable object by setting a present value for the optionaldefangedattribute.final UserAccountwithDefanged(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedefangedattribute.final UserAccountwithDisplayName(String value) Copy the current immutable object by setting a present value for the optionaldisplayNameattribute.final UserAccountwithDisplayName(Optional<String> optional) Copy the current immutable object by setting an optional value for thedisplayNameattribute.final UserAccountwithExtensions(Iterable<? extends CyberObservableExtension> elements) Copy the current immutable object with elements that replace the content ofextensions.final UserAccountwithExtensions(CyberObservableExtension... elements) Copy the current immutable object with elements that replace the content ofextensions.final UserAccountwithGranularMarkings(Iterable<? extends GranularMarkingDm> elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final UserAccountwithGranularMarkings(GranularMarkingDm... elements) Copy the current immutable object with elements that replace the content ofgranularMarkings.final UserAccountwithHydrated(boolean value) Copy the current immutable object by setting a value for thehydratedattribute.final UserAccountwithIsCanEscalatePrivs(boolean value) Copy the current immutable object by setting a present value for the optionalisCanEscalatePrivsattribute.final UserAccountwithIsCanEscalatePrivs(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisCanEscalatePrivsattribute.final UserAccountwithIsDisabled(boolean value) Copy the current immutable object by setting a present value for the optionalisDisabledattribute.final UserAccountwithIsDisabled(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisDisabledattribute.final UserAccountwithIsPrivileged(boolean value) Copy the current immutable object by setting a present value for the optionalisPrivilegedattribute.final UserAccountwithIsPrivileged(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisPrivilegedattribute.final UserAccountwithIsServiceAccount(boolean value) Copy the current immutable object by setting a present value for the optionalisServiceAccountattribute.final UserAccountwithIsServiceAccount(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theisServiceAccountattribute.final UserAccountwithObjectMarkingRefs(Iterable<? extends MarkingDefinitionDm> elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final UserAccountwithObjectMarkingRefs(MarkingDefinitionDm... elements) Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.final UserAccountwithObservableObjectKey(String value) Copy the current immutable object by setting a value for theobservableObjectKeyattribute.final UserAccountwithPasswordLastChanged(Optional<? extends StixInstant> optional) Copy the current immutable object by setting an optional value for thepasswordLastChangedattribute.final UserAccountCopy the current immutable object by setting a present value for the optionalpasswordLastChangedattribute.final UserAccountwithToJsonString(String value) Copy the current immutable object by setting a value for thetoJsonStringattribute.final UserAccountCopy the current immutable object by setting a value for thetypeattribute.final UserAccountwithUserId(String value) Copy the current immutable object by setting a value for theuserIdattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface security.whisper.javastix.validation.GenericValidation
validateEntityMethods inherited from interface security.whisper.javastix.validation.SdoDefaultValidator
validate, validateOnlyId
-
Method Details
-
getUserId
- Specified by:
getUserIdin interfaceUserAccountCoo- Returns:
- The value of the
userIdattribute
-
getAccountLogin
@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 Optional<String> getAccountLogin()- Specified by:
getAccountLoginin interfaceUserAccountCoo- Returns:
- The value of the
accountLoginattribute
-
getAccountType
@JsonPropertyDescription("Specifies the type of the account. This is an open vocabulary and values SHOULD come from the account-type-ov vocabulary.") public Optional<String> getAccountType()- Specified by:
getAccountTypein interfaceUserAccountCoo- Returns:
- The value of the
accountTypeattribute
-
getDisplayName
@JsonPropertyDescription("Specifies the display name of the account, to be shown in user interfaces, if applicable.") public Optional<String> getDisplayName()- Specified by:
getDisplayNamein interfaceUserAccountCoo- Returns:
- The value of the
displayNameattribute
-
isServiceAccount
@JsonPropertyDescription("Indicates that the account is associated with a network service or system process (daemon), not a specific individual.") public Optional<Boolean> isServiceAccount()- Specified by:
isServiceAccountin interfaceUserAccountCoo- Returns:
- The value of the
isServiceAccountattribute
-
isPrivileged
@JsonPropertyDescription("Specifies that the account has elevated privileges (i.e., in the case of root on Unix or the Windows Administrator account).") public Optional<Boolean> isPrivileged()- Specified by:
isPrivilegedin interfaceUserAccountCoo- Returns:
- The value of the
isPrivilegedattribute
-
isCanEscalatePrivs
@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 Optional<Boolean> isCanEscalatePrivs()- Specified by:
isCanEscalatePrivsin interfaceUserAccountCoo- Returns:
- The value of the
isCanEscalatePrivsattribute
-
isDisabled
@JsonPropertyDescription("Specifies if the account is disabled.") public Optional<Boolean> isDisabled()- Specified by:
isDisabledin interfaceUserAccountCoo- Returns:
- The value of the
isDisabledattribute
-
getAccountCreated
@JsonPropertyDescription("Specifies when the account was created.") public Optional<StixInstant> getAccountCreated()- Specified by:
getAccountCreatedin interfaceUserAccountCoo- Returns:
- The value of the
accountCreatedattribute
-
getAccountExpires
@JsonPropertyDescription("Specifies the expiration date of the account.") public Optional<StixInstant> getAccountExpires()- Specified by:
getAccountExpiresin interfaceUserAccountCoo- Returns:
- The value of the
accountExpiresattribute
-
getPasswordLastChanged
@JsonPropertyDescription("Specifies when the account password was last changed.") public Optional<StixInstant> getPasswordLastChanged()- Specified by:
getPasswordLastChangedin interfaceUserAccountCoo- Returns:
- The value of the
passwordLastChangedattribute
-
getAccountFirstLogin
@JsonPropertyDescription("Specifies when the account was first accessed.") public Optional<StixInstant> getAccountFirstLogin()- Specified by:
getAccountFirstLoginin interfaceUserAccountCoo- Returns:
- The value of the
accountFirstLoginattribute
-
getAccountLastLogin
@JsonPropertyDescription("Specifies when the account was last accessed.") public Optional<StixInstant> getAccountLastLogin()- Specified by:
getAccountLastLoginin interfaceUserAccountCoo- Returns:
- The value of the
accountLastLoginattribute
-
getId
Deterministically generates the ID for this user account based on its user ID.- Specified by:
getIdin interfaceBundleableObject- Specified by:
getIdin interfaceCyberObservableObjectCommonProperties- Specified by:
getIdin interfaceUserAccountCoo
-
getType
- Specified by:
getTypein interfaceBundleableObject- Specified by:
getTypein interfaceCyberObservableObjectCommonProperties- Returns:
- The value of the
typeattribute
-
getExtensions
@JsonPropertyDescription("Specifies any extensions of the object, as a dictionary.") public com.google.common.collect.ImmutableSet<CyberObservableExtension> getExtensions()Multiple extensions can be added, but only 1 instance of a specific extension can be added.- Specified by:
getExtensionsin interfaceCyberObservableObjectCommonProperties
-
getObservableObjectKey
Used for generation of Map Keys byManually set this value if you want to control key names. Otherwise UUIDs will be used.invalid reference
ObservedDataSdo#getObjects()- Specified by:
getObservableObjectKeyin interfaceCyberObservableObjectCommonProperties
-
getDefanged
@JsonPropertyDescription("Indicates whether the data contained in the SCO has been defanged.") public Optional<Boolean> getDefanged()Indicates whether the data contained in the SCO has been defanged. Defanging refers to the process of modifying data to make it safe to handle (e.g., changing an IP address from 192.168.1.1 to 192[.]168[.]1[.]1).- Specified by:
getDefangedin interfaceCyberObservableObjectCommonProperties
-
getCustomProperties
Custom Properties for STIX Objects. Any object that supports custom properties will have a validation of the custom property prefix (typically "x_"). If the additional property in the JSON does not meet the StartsWith condition, then the JSON will be rejected.- Specified by:
getCustomPropertiesin interfaceStixCustomProperties- Returns:
- Map of custom properties
Map<String, Object>
-
getObjectMarkingRefs
- Specified by:
getObjectMarkingRefsin interfaceBundleableObject- Returns:
- The value of the
objectMarkingRefsattribute
-
getGranularMarkings
- Specified by:
getGranularMarkingsin interfaceBundleableObject- Returns:
- The value of the
granularMarkingsattribute
-
getHydrated
public boolean getHydrated()- Specified by:
getHydratedin interfaceBundleableObject- Returns:
- The value of the
hydratedattribute
-
toJsonString
- Specified by:
toJsonStringin interfaceBundleableObject- Returns:
- The value of the
toJsonStringattribute
-
withUserId
Copy the current immutable object by setting a value for theuserIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for userId (can benull)- Returns:
- A modified copy of the
thisobject
-
withAccountLogin
Copy the current immutable object by setting a present value for the optionalaccountLoginattribute.- Parameters:
value- The value for accountLogin- Returns:
- A modified copy of
thisobject
-
withAccountLogin
Copy the current immutable object by setting an optional value for theaccountLoginattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountLogin- Returns:
- A modified copy of
thisobject
-
withAccountType
Copy the current immutable object by setting a present value for the optionalaccountTypeattribute.- Parameters:
value- The value for accountType- Returns:
- A modified copy of
thisobject
-
withAccountType
Copy the current immutable object by setting an optional value for theaccountTypeattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountType- Returns:
- A modified copy of
thisobject
-
withDisplayName
Copy the current immutable object by setting a present value for the optionaldisplayNameattribute.- Parameters:
value- The value for displayName- Returns:
- A modified copy of
thisobject
-
withDisplayName
Copy the current immutable object by setting an optional value for thedisplayNameattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for displayName- Returns:
- A modified copy of
thisobject
-
withIsServiceAccount
Copy the current immutable object by setting a present value for the optionalisServiceAccountattribute.- Parameters:
value- The value for isServiceAccount- Returns:
- A modified copy of
thisobject
-
withIsServiceAccount
Copy the current immutable object by setting an optional value for theisServiceAccountattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for isServiceAccount- Returns:
- A modified copy of
thisobject
-
withIsPrivileged
Copy the current immutable object by setting a present value for the optionalisPrivilegedattribute.- Parameters:
value- The value for isPrivileged- Returns:
- A modified copy of
thisobject
-
withIsPrivileged
Copy the current immutable object by setting an optional value for theisPrivilegedattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for isPrivileged- Returns:
- A modified copy of
thisobject
-
withIsCanEscalatePrivs
Copy the current immutable object by setting a present value for the optionalisCanEscalatePrivsattribute.- Parameters:
value- The value for isCanEscalatePrivs- Returns:
- A modified copy of
thisobject
-
withIsCanEscalatePrivs
Copy the current immutable object by setting an optional value for theisCanEscalatePrivsattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for isCanEscalatePrivs- Returns:
- A modified copy of
thisobject
-
withIsDisabled
Copy the current immutable object by setting a present value for the optionalisDisabledattribute.- Parameters:
value- The value for isDisabled- Returns:
- A modified copy of
thisobject
-
withIsDisabled
Copy the current immutable object by setting an optional value for theisDisabledattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for isDisabled- Returns:
- A modified copy of
thisobject
-
withAccountCreated
Copy the current immutable object by setting a present value for the optionalaccountCreatedattribute.- Parameters:
value- The value for accountCreated- Returns:
- A modified copy of
thisobject
-
withAccountCreated
Copy the current immutable object by setting an optional value for theaccountCreatedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountCreated- Returns:
- A modified copy of
thisobject
-
withAccountExpires
Copy the current immutable object by setting a present value for the optionalaccountExpiresattribute.- Parameters:
value- The value for accountExpires- Returns:
- A modified copy of
thisobject
-
withAccountExpires
Copy the current immutable object by setting an optional value for theaccountExpiresattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountExpires- Returns:
- A modified copy of
thisobject
-
withPasswordLastChanged
Copy the current immutable object by setting a present value for the optionalpasswordLastChangedattribute.- Parameters:
value- The value for passwordLastChanged- Returns:
- A modified copy of
thisobject
-
withPasswordLastChanged
Copy the current immutable object by setting an optional value for thepasswordLastChangedattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for passwordLastChanged- Returns:
- A modified copy of
thisobject
-
withAccountFirstLogin
Copy the current immutable object by setting a present value for the optionalaccountFirstLoginattribute.- Parameters:
value- The value for accountFirstLogin- Returns:
- A modified copy of
thisobject
-
withAccountFirstLogin
Copy the current immutable object by setting an optional value for theaccountFirstLoginattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountFirstLogin- Returns:
- A modified copy of
thisobject
-
withAccountLastLogin
Copy the current immutable object by setting a present value for the optionalaccountLastLoginattribute.- Parameters:
value- The value for accountLastLogin- Returns:
- A modified copy of
thisobject
-
withAccountLastLogin
Copy the current immutable object by setting an optional value for theaccountLastLoginattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for accountLastLogin- Returns:
- A modified copy of
thisobject
-
withType
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExtensions
Copy the current immutable object with elements that replace the content ofextensions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of extensions elements to set- Returns:
- A modified copy of
thisobject
-
withObservableObjectKey
Copy the current immutable object by setting a value for theobservableObjectKeyattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for observableObjectKey- Returns:
- A modified copy of the
thisobject
-
withDefanged
Copy the current immutable object by setting a present value for the optionaldefangedattribute.- Parameters:
value- The value for defanged- Returns:
- A modified copy of
thisobject
-
withDefanged
Copy the current immutable object by setting an optional value for thedefangedattribute. An equality check is used on inner nullable value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for defanged- Returns:
- A modified copy of
thisobject
-
withCustomProperties
Copy the current immutable object by replacing thecustomPropertiesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the customProperties map- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withObjectMarkingRefs
Copy the current immutable object with elements that replace the content ofobjectMarkingRefs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of objectMarkingRefs elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withGranularMarkings
Copy the current immutable object with elements that replace the content ofgranularMarkings. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of granularMarkings elements to set- Returns:
- A modified copy of
thisobject
-
withHydrated
Copy the current immutable object by setting a value for thehydratedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hydrated- Returns:
- A modified copy of the
thisobject
-
withToJsonString
Copy the current immutable object by setting a value for thetoJsonStringattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for toJsonString (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofUserAccountthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:userId,accountLogin,accountType,displayName,isServiceAccount,isPrivileged,isCanEscalatePrivs,isDisabled,accountCreated,accountExpires,passwordLastChanged,accountFirstLogin,accountLastLogin,id,type,extensions,observableObjectKey,defanged,customProperties,objectMarkingRefs,granularMarkings,hydrated,toJsonString. -
toString
Prints the immutable valueUserAccountwith attribute values. -
copyOf
Creates an immutable copy of aUserAccountCoovalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable UserAccount instance
-
builder
Creates a builder forUserAccount.- Returns:
- A new UserAccount builder
-