Class WindowsServiceExtension.Builder
java.lang.Object
security.whisper.javastix.coo.extension.types.WindowsServiceExtension.Builder
- Enclosing class:
WindowsServiceExtension
Builds instances of type
WindowsServiceExtension.
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 newWindowsServiceExtension.customProperties(Map<String, ? extends Object> entries) Sets or replaces all mappings from the specified map as entries for thecustomPropertiesmap.displayName(String displayName) Initializes the optional valuedisplayNameto displayName.displayName(Optional<String> displayName) Initializes the optional valuedisplayNameto displayName.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(WindowsServiceExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.WindowsServiceExtensionExtinstance.Initializes the optional valuegroupNameto groupName.Initializes the optional valuegroupNameto groupName.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.serviceName(String serviceName) Initializes the value for theserviceNameattribute.serviceStartType(String serviceStartType) Initializes the optional valueserviceStartTypeto serviceStartType.serviceStartType(Optional<String> serviceStartType) Initializes the optional valueserviceStartTypeto serviceStartType.serviceStatus(String serviceStatus) Initializes the optional valueserviceStatusto serviceStatus.serviceStatus(Optional<String> serviceStatus) Initializes the optional valueserviceStatusto serviceStatus.serviceType(String serviceType) Initializes the optional valueserviceTypeto serviceType.serviceType(Optional<String> serviceType) Initializes the optional valueserviceTypeto serviceType.Initializes the value for thetypeattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final WindowsServiceExtension.Builder from(WindowsServiceExtensionExt instance) Fill a builder with attribute values from the providedsecurity.whisper.javastix.coo.extension.types.WindowsServiceExtensionExtinstance.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
from
@CanIgnoreReturnValue public final WindowsServiceExtension.Builder from(StixCustomProperties instance) 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 WindowsServiceExtension.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
-
serviceName
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the name of the service.") public final WindowsServiceExtension.Builder serviceName(String serviceName) Initializes the value for theserviceNameattribute.- Parameters:
serviceName- The value for serviceName (can benull)- 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 displayed name of the service in Windows GUI controls.") public final WindowsServiceExtension.Builder displayName(Optional<String> displayName) Initializes the optional valuedisplayNameto displayName.- Parameters:
displayName- The value for displayName- Returns:
thisbuilder for use in a chained invocation
-
groupName
Initializes the optional valuegroupNameto groupName.- Parameters:
groupName- The value for groupName- Returns:
thisbuilder for chained invocation
-
groupName
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the name of the load ordering group of which the service is a member.") public final WindowsServiceExtension.Builder groupName(Optional<String> groupName) Initializes the optional valuegroupNameto groupName.- Parameters:
groupName- The value for groupName- Returns:
thisbuilder for use in a chained invocation
-
serviceStartType
@CanIgnoreReturnValue public final WindowsServiceExtension.Builder serviceStartType(String serviceStartType) Initializes the optional valueserviceStartTypeto serviceStartType.- Parameters:
serviceStartType- The value for serviceStartType- Returns:
thisbuilder for chained invocation
-
serviceStartType
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the start options defined for the service. windows-service-start-enum") public final WindowsServiceExtension.Builder serviceStartType(Optional<String> serviceStartType) Initializes the optional valueserviceStartTypeto serviceStartType.- Parameters:
serviceStartType- The value for serviceStartType- Returns:
thisbuilder for use in a chained invocation
-
serviceType
Initializes the optional valueserviceTypeto serviceType.- Parameters:
serviceType- The value for serviceType- Returns:
thisbuilder for chained invocation
-
serviceType
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the type of the service. windows-service-enum") public final WindowsServiceExtension.Builder serviceType(Optional<String> serviceType) Initializes the optional valueserviceTypeto serviceType.- Parameters:
serviceType- The value for serviceType- Returns:
thisbuilder for use in a chained invocation
-
serviceStatus
@CanIgnoreReturnValue public final WindowsServiceExtension.Builder serviceStatus(String serviceStatus) Initializes the optional valueserviceStatusto serviceStatus.- Parameters:
serviceStatus- The value for serviceStatus- Returns:
thisbuilder for chained invocation
-
serviceStatus
@CanIgnoreReturnValue @JsonPropertyDescription("Specifies the current status of the service. windows-service-status-enum") public final WindowsServiceExtension.Builder serviceStatus(Optional<String> serviceStatus) Initializes the optional valueserviceStatusto serviceStatus.- Parameters:
serviceStatus- The value for serviceStatus- 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 WindowsServiceExtension.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 WindowsServiceExtension.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 WindowsServiceExtension.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 WindowsServiceExtension.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 newWindowsServiceExtension.- Returns:
- An immutable instance of WindowsServiceExtension
- Throws:
IllegalStateException- if any required attributes are missing
-