Class UnixAccountExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.UnixAccountExtension.Builder
- Enclosing class:
UnixAccountExtension
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 Summary
Modifier and TypeMethodDescriptionbuild()Builds a newUnixAccountExtension.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.from(StixCustomProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.common.StixCustomPropertiesinstance.from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.from(UnixAccountExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.UnixAccountExtensionExtinstance.gid(long gid) Initializes the optional valuegidto gid.Initializes the optional valuegidto gid.Initializes the optional valuehomeDirto homeDir.Initializes the optional valuehomeDirto homeDir.putAllCustomProperties(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries tocustomPropertiesmap.putCustomProperty(String key, Object value) Put one entry to thecustomPropertiesmap.putCustomProperty(Map.Entry<String, ? extends Object> entry) Put one entry to thecustomPropertiesmap.Initializes the optional valueshellto shell.Initializes the optional valueshellto shell.Initializes the value for thetypeattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final UnixAccountExtension.Builder from(UnixAccountExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.UnixAccountExtensionExtinstance.- 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
@CanIgnoreReturnValue public final UnixAccountExtension.Builder from(CyberObservableExtensionCommonProperties instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.CyberObservableExtensionCommonPropertiesinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
gid
Initializes the optional valuegidto gid.- Parameters:
gid- The value for gid- Returns:
thisbuilder 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 valuegidto gid.- Parameters:
gid- The value for gid- Returns:
thisbuilder for use in a chained invocation
-
homeDir
Initializes the optional valuehomeDirto homeDir.- Parameters:
homeDir- The value for homeDir- Returns:
thisbuilder for chained invocation
-
homeDir
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the home directory of the account.") public final UnixAccountExtension.Builder homeDir(Optional<String> homeDir) Initializes the optional valuehomeDirto homeDir.- Parameters:
homeDir- The value for homeDir- Returns:
thisbuilder for use in a chained invocation
-
shell
Initializes the optional valueshellto shell.- Parameters:
shell- The value for shell- Returns:
thisbuilder for chained invocation
-
shell
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the account\u2019s command shell.") public final UnixAccountExtension.Builder shell(Optional<String> shell) Initializes the optional valueshellto shell.- Parameters:
shell- The value for shell- 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
-
putCustomProperty
@CanIgnoreReturnValue public final UnixAccountExtension.Builder putCustomProperty(String key, Object value) 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 UnixAccountExtension.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 UnixAccountExtension.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 UnixAccountExtension.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
-
build
Builds a newUnixAccountExtension.- Returns:
- An immutable instance of UnixAccountExtension
- Throws:
IllegalStateException- if any required attributes are missing
-