Class WindowsServiceExtension

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

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue @AllowedParents(ProcessCoo.class) public final class WindowsServiceExtension extends Object implements WindowsServiceExtensionExt, Serializable
windows-service-ext

The Windows Service extension specifies a default extension for capturing properties specific to Windows services.

See Also:
  • Method Details

    • getServiceName

      @JsonPropertyDescription("Specifies the name of the service.") public String getServiceName()
      Specified by:
      getServiceName in interface WindowsServiceExtensionExt
      Returns:
      The value of the serviceName attribute
    • getDisplayName

      @JsonPropertyDescription("Specifies the displayed name of the service in Windows GUI controls.") public Optional<String> getDisplayName()
      Specified by:
      getDisplayName in interface WindowsServiceExtensionExt
      Returns:
      The value of the displayName attribute
    • getGroupName

      @JsonPropertyDescription("Specifies the name of the load ordering group of which the service is a member.") public Optional<String> getGroupName()
      Specified by:
      getGroupName in interface WindowsServiceExtensionExt
      Returns:
      The value of the groupName attribute
    • getServiceStartType

      @JsonPropertyDescription("Specifies the start options defined for the service. windows-service-start-enum") public Optional<String> getServiceStartType()
      Specified by:
      getServiceStartType in interface WindowsServiceExtensionExt
      Returns:
      The value of the serviceStartType attribute
    • getServiceType

      @JsonPropertyDescription("Specifies the type of the service. windows-service-enum") public Optional<String> getServiceType()
      Specified by:
      getServiceType in interface WindowsServiceExtensionExt
      Returns:
      The value of the serviceType attribute
    • getServiceStatus

      @JsonPropertyDescription("Specifies the current status of the service. windows-service-status-enum") public Optional<String> getServiceStatus()
      Specified by:
      getServiceStatus in interface WindowsServiceExtensionExt
      Returns:
      The value of the serviceStatus 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>
    • withServiceName

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

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

      public final WindowsServiceExtension withDisplayName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the displayName 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 displayName
      Returns:
      A modified copy of this object
    • withGroupName

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

      public final WindowsServiceExtension withGroupName(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the groupName 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 groupName
      Returns:
      A modified copy of this object
    • withServiceStartType

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

      public final WindowsServiceExtension withServiceStartType(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the serviceStartType 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 serviceStartType
      Returns:
      A modified copy of this object
    • withServiceType

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

      public final WindowsServiceExtension withServiceType(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the serviceType 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 serviceType
      Returns:
      A modified copy of this object
    • withServiceStatus

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

      public final WindowsServiceExtension withServiceStatus(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the serviceStatus 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 serviceStatus
      Returns:
      A modified copy of this object
    • withType

      public final WindowsServiceExtension 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 WindowsServiceExtension 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 WindowsServiceExtension 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: serviceName, displayName, groupName, serviceStartType, serviceType, serviceStatus, type, customProperties.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static WindowsServiceExtension copyOf(WindowsServiceExtensionExt instance)
      Creates an immutable copy of a WindowsServiceExtensionExt 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 WindowsServiceExtension instance
    • builder

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