Class UnixAccountExtension.Builder

java.lang.Object
security.whisper.javastix.coo.extension.types.UnixAccountExtension.Builder
Enclosing class:
UnixAccountExtension

@NotThreadSafe public static final class UnixAccountExtension.Builder extends Object
Builds instances of type UnixAccountExtension. 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 Details

    • from

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder from(UnixAccountExtensionExt instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.coo.extension.types.UnixAccountExtensionExt instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder from(StixCustomProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.common.StixCustomProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder from(CyberObservableExtensionCommonProperties instance)
      Fill a builder with attribute values from the provided security.whisper.javastix.coo.extension.CyberObservableExtensionCommonProperties instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • gid

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder gid(long gid)
      Initializes the optional value gid to gid.
      Parameters:
      gid - The value for gid
      Returns:
      this builder for chained invocation
    • gid

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the primary group ID of the account.") public final UnixAccountExtension.Builder gid(Optional<Long> gid)
      Initializes the optional value gid to gid.
      Parameters:
      gid - The value for gid
      Returns:
      this builder for use in a chained invocation
    • homeDir

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder homeDir(String homeDir)
      Initializes the optional value homeDir to homeDir.
      Parameters:
      homeDir - The value for homeDir
      Returns:
      this builder for chained invocation
    • homeDir

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the home directory of the account.") public final UnixAccountExtension.Builder homeDir(Optional<String> homeDir)
      Initializes the optional value homeDir to homeDir.
      Parameters:
      homeDir - The value for homeDir
      Returns:
      this builder for use in a chained invocation
    • shell

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder shell(String shell)
      Initializes the optional value shell to shell.
      Parameters:
      shell - The value for shell
      Returns:
      this builder for chained invocation
    • shell

      @CanIgnoreReturnValue @JsonPropertyDescription("Specifies the account\u2019s command shell.") public final UnixAccountExtension.Builder shell(Optional<String> shell)
      Initializes the optional value shell to shell.
      Parameters:
      shell - The value for shell
      Returns:
      this builder for use in a chained invocation
    • type

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder type(String type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type (can be null)
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder putCustomProperty(String key, Object value)
      Put one entry to the customProperties map.
      Parameters:
      key - The key in the customProperties map
      value - The associated value in the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putCustomProperty

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder putCustomProperty(Map.Entry<String,? extends Object> entry)
      Put one entry to the customProperties map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • customProperties

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder customProperties(Map<String,? extends Object> entries)
      Sets or replaces all mappings from the specified map as entries for the customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • putAllCustomProperties

      @CanIgnoreReturnValue public final UnixAccountExtension.Builder putAllCustomProperties(Map<String,? extends Object> entries)
      Put all mappings from the specified map as entries to customProperties map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the customProperties map
      Returns:
      this builder for use in a chained invocation
    • build

      public UnixAccountExtension build()
      Builds a new UnixAccountExtension.
      Returns:
      An immutable instance of UnixAccountExtension
      Throws:
      IllegalStateException - if any required attributes are missing