Class UnixAccountExtension

java.lang.Object
security.whisper.javastix.coo.extension.types.UnixAccountExtension
All Implemented Interfaces:
Serializable, StixCustomProperties, CyberObservableExtension, CyberObservableExtensionCommonProperties, UnixAccountExtensionExt, GenericValidation, SdoDefaultValidator

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @AllowedParents(UserAccountCoo.class) public final class UnixAccountExtension extends Object implements UnixAccountExtensionExt, Serializable
unix-account-ext

The UNIX account extension specifies a default extension for capturing the additional information for an account on a UNIX system.

See Also:
  • Method Details

    • getGid

      @JsonPropertyDescription("Specifies the primary group ID of the account.") public Optional<Long> getGid()
      Specified by:
      getGid in interface UnixAccountExtensionExt
      Returns:
      The value of the gid attribute
    • getHomeDir

      @JsonPropertyDescription("Specifies the home directory of the account.") public Optional<String> getHomeDir()
      Specified by:
      getHomeDir in interface UnixAccountExtensionExt
      Returns:
      The value of the homeDir attribute
    • getShell

      @JsonPropertyDescription("Specifies the account\u2019s command shell.") public Optional<String> getShell()
      Specified by:
      getShell in interface UnixAccountExtensionExt
      Returns:
      The value of the shell attribute
    • getType

      public String getType()
      This property is used for generation of the dictionary during serialization, and used as the "Type" mapping value for polymorphic when deserializing.
      Specified by:
      getType in interface CyberObservableExtensionCommonProperties
    • getCustomProperties

      public com.google.common.collect.ImmutableMap<String,Object> 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:
      getCustomProperties in interface StixCustomProperties
      Returns:
      Map of custom properties Map<String, Object>
    • withGid

      public final UnixAccountExtension withGid(long value)
      Copy the current immutable object by setting a present value for the optional gid attribute.
      Parameters:
      value - The value for gid
      Returns:
      A modified copy of this object
    • withGid

      public final UnixAccountExtension withGid(Optional<Long> optional)
      Copy the current immutable object by setting an optional value for the gid attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for gid
      Returns:
      A modified copy of this object
    • withHomeDir

      public final UnixAccountExtension withHomeDir(String value)
      Copy the current immutable object by setting a present value for the optional homeDir attribute.
      Parameters:
      value - The value for homeDir
      Returns:
      A modified copy of this object
    • withHomeDir

      public final UnixAccountExtension withHomeDir(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the homeDir attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for homeDir
      Returns:
      A modified copy of this object
    • withShell

      public final UnixAccountExtension withShell(String value)
      Copy the current immutable object by setting a present value for the optional shell attribute.
      Parameters:
      value - The value for shell
      Returns:
      A modified copy of this object
    • withShell

      public final UnixAccountExtension withShell(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the shell attribute. An equality check is used on inner nullable value to prevent copying of the same value by returning this.
      Parameters:
      optional - A value for shell
      Returns:
      A modified copy of this object
    • withType

      public final UnixAccountExtension withType(String value)
      Copy the current immutable object by setting a value for the type attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type (can be null)
      Returns:
      A modified copy of the this object
    • withCustomProperties

      public final UnixAccountExtension withCustomProperties(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the customProperties map 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 returning this.
      Parameters:
      entries - The entries to be added to the customProperties map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of UnixAccountExtension that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: gid, homeDir, shell, type, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value UnixAccountExtension with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static UnixAccountExtension copyOf(UnixAccountExtensionExt instance)
      Creates an immutable copy of a UnixAccountExtensionExt value. 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 UnixAccountExtension instance
    • builder

      public static UnixAccountExtension.Builder builder()
      Creates a builder for UnixAccountExtension.
      Returns:
      A new UnixAccountExtension builder