# Class XSProcessorRequest

java.lang.Object
com.io7m.xstructural.api.XSProcessorRequest

All Implemented Interfaces:
  `XSProcessorRequestType`

public final class XSProcessorRequest extends Object implements XSProcessorRequestType
A document processor request.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `XSProcessorRequest.Builder`
  Builds instances of type `XSProcessorRequest`.

  ### Nested classes/interfaces inherited from interface XSProcessorRequestType

  `XSProcessorRequestType.Stylesheet, XSProcessorRequestType.Task`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Optional<Path>`
  `brandingFile()`
  `static XSProcessorRequest.Builder`
  `builder()`
  Creates a builder for `XSProcessorRequest`.
  `static XSProcessorRequest`
  `copyOf(XSProcessorRequestType instance)`
  Creates an immutable copy of a `XSProcessorRequestType` value.
  `boolean`
  `equals(Object another)`
  This instance is equal to all instances of `XSProcessorRequest` that have equal attribute values.
  `int`
  `hashCode()`
  Computes a hash code from attributes: `outputDirectory`, `sourceFile`, `task`, `stylesheet`, `writeResources`, `traceFile`, `messageFile`, `brandingFile`, `outputName`, `typeDescriptionFile`.
  `Path`
  `messageFile()`
  `Path`
  `outputDirectory()`
  `Optional<String>`
  `outputName()`
  `Path`
  `sourceFile()`
  `XSProcessorRequestType.Stylesheet`
  `stylesheet()`
  `XSProcessorRequestType.Task`
  `task()`
  `String`
  `toString()`
  Prints the immutable value `XSProcessorRequest` with attribute values.
  `Path`
  `traceFile()`
  `Optional<Path>`
  `typeDescriptionFile()`
  `final XSProcessorRequest`
  `withBrandingFile(Path value)`
  Copy the current immutable object by setting a present value for the optional `brandingFile` attribute.
  `final XSProcessorRequest`
  `withBrandingFile(Optional<? extends Path> optional)`
  Copy the current immutable object by setting an optional value for the `brandingFile` attribute.
  `final XSProcessorRequest`
  `withMessageFile(Path value)`
  Copy the current immutable object by setting a value for the `messageFile` attribute.
  `final XSProcessorRequest`
  `withOutputDirectory(Path value)`
  Copy the current immutable object by setting a value for the `outputDirectory` attribute.
  `final XSProcessorRequest`
  `withOutputName(String value)`
  Copy the current immutable object by setting a present value for the optional `outputName` attribute.
  `final XSProcessorRequest`
  `withOutputName(Optional<String> optional)`
  Copy the current immutable object by setting an optional value for the `outputName` attribute.
  `final XSProcessorRequest`
  `withSourceFile(Path value)`
  Copy the current immutable object by setting a value for the `sourceFile` attribute.
  `final XSProcessorRequest`
  `withStylesheet(XSProcessorRequestType.Stylesheet value)`
  Copy the current immutable object by setting a value for the `stylesheet` attribute.
  `final XSProcessorRequest`
  `withTask(XSProcessorRequestType.Task value)`
  Copy the current immutable object by setting a value for the `task` attribute.
  `final XSProcessorRequest`
  `withTraceFile(Path value)`
  Copy the current immutable object by setting a value for the `traceFile` attribute.
  `final XSProcessorRequest`
  `withTypeDescriptionFile(Path value)`
  Copy the current immutable object by setting a present value for the optional `typeDescriptionFile` attribute.
  `final XSProcessorRequest`
  `withTypeDescriptionFile(Optional<? extends Path> optional)`
  Copy the current immutable object by setting an optional value for the `typeDescriptionFile` attribute.
  `final XSProcessorRequest`
  `withWriteResources(boolean value)`
  Copy the current immutable object by setting a value for the `writeResources` attribute.
  `boolean`
  `writeResources()`

  ### Methods inherited from class Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface XSProcessorRequestType

  `checkPreconditions`

- ## Method Details

  - ### outputDirectory

    public Path outputDirectory()
    Specified by:
      `outputDirectory` in interface `XSProcessorRequestType`
    Returns:
      The directory to which output files will be written

  - ### sourceFile

    public Path sourceFile()
    Specified by:
      `sourceFile` in interface `XSProcessorRequestType`
    Returns:
      The source document

  - ### task

    public XSProcessorRequestType.Task task()
    Specified by:
      `task` in interface `XSProcessorRequestType`
    Returns:
      The task that will be executed

  - ### stylesheet

    public XSProcessorRequestType.Stylesheet stylesheet()
    Specified by:
      `stylesheet` in interface `XSProcessorRequestType`
    Returns:
      The stylesheet that will be used

  - ### writeResources

    public boolean writeResources()
    Specified by:
      `writeResources` in interface `XSProcessorRequestType`
    Returns:
      `true` if resources (such as CSS) should be copied into the output directory

  - ### traceFile

    public Path traceFile()
    Specified by:
      `traceFile` in interface `XSProcessorRequestType`
    Returns:
      The file to which trace messages will be written

  - ### messageFile

    public Path messageFile()
    Specified by:
      `messageFile` in interface `XSProcessorRequestType`
    Returns:
      The file to which XSLT messages will be written

  - ### brandingFile

    public Optional<Path> brandingFile()
    Specified by:
      `brandingFile` in interface `XSProcessorRequestType`
    Returns:
      The branding file that will be included into output documents

  - ### outputName

    public Optional<String> outputName()
    Specified by:
      `outputName` in interface `XSProcessorRequestType`
    Returns:
      The name of the output file, if relevant to the operation

  - ### typeDescriptionFile

    public Optional<Path> typeDescriptionFile()
    Specified by:
      `typeDescriptionFile` in interface `XSProcessorRequestType`
    Returns:
      The type description file used to validate type attributes.
    Since:
      2.0.0

  - ### withOutputDirectory

    public final XSProcessorRequest withOutputDirectory(Path value)
    Copy the current immutable object by setting a value for the `outputDirectory` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for outputDirectory
    Returns:
      A modified copy or the `this` object

  - ### withSourceFile

    public final XSProcessorRequest withSourceFile(Path value)
    Copy the current immutable object by setting a value for the `sourceFile` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for sourceFile
    Returns:
      A modified copy or the `this` object

  - ### withTask

    public final XSProcessorRequest withTask(XSProcessorRequestType.Task value)
    Copy the current immutable object by setting a value for the `task` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for task
    Returns:
      A modified copy or the `this` object

  - ### withStylesheet

    public final XSProcessorRequest withStylesheet(XSProcessorRequestType.Stylesheet value)
    Copy the current immutable object by setting a value for the `stylesheet` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for stylesheet
    Returns:
      A modified copy or the `this` object

  - ### withWriteResources

    public final XSProcessorRequest withWriteResources(boolean value)
    Copy the current immutable object by setting a value for the `writeResources` attribute. A value equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for writeResources
    Returns:
      A modified copy or the `this` object

  - ### withTraceFile

    public final XSProcessorRequest withTraceFile(Path value)
    Copy the current immutable object by setting a value for the `traceFile` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for traceFile
    Returns:
      A modified copy or the `this` object

  - ### withMessageFile

    public final XSProcessorRequest withMessageFile(Path value)
    Copy the current immutable object by setting a value for the `messageFile` attribute. A shallow reference equality check is used to prevent copying of the same value by returning `this`.
    Parameters:
      `value` - A new value for messageFile
    Returns:
      A modified copy or the `this` object

  - ### withBrandingFile

    public final XSProcessorRequest withBrandingFile(Path value)
    Copy the current immutable object by setting a present value for the optional `brandingFile` attribute.
    Parameters:
      `value` - The value for brandingFile
    Returns:
      A modified copy or `this` if not changed

  - ### withBrandingFile

    public final XSProcessorRequest withBrandingFile(Optional<? extends Path> optional)
    Copy the current immutable object by setting an optional value for the `brandingFile` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - An optional value for brandingFile
    Returns:
      A modified copy or `this` if not changed

  - ### withOutputName

    public final XSProcessorRequest withOutputName(String value)
    Copy the current immutable object by setting a present value for the optional `outputName` attribute.
    Parameters:
      `value` - The value for outputName
    Returns:
      A modified copy or `this` if not changed

  - ### withOutputName

    public final XSProcessorRequest withOutputName(Optional<String> optional)
    Copy the current immutable object by setting an optional value for the `outputName` attribute. An equality check is used on inner value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - An optional value for outputName
    Returns:
      A modified copy or `this` if not changed

  - ### withTypeDescriptionFile

    public final XSProcessorRequest withTypeDescriptionFile(Path value)
    Copy the current immutable object by setting a present value for the optional `typeDescriptionFile` attribute.
    Parameters:
      `value` - The value for typeDescriptionFile
    Returns:
      A modified copy or `this` if not changed

  - ### withTypeDescriptionFile

    public final XSProcessorRequest withTypeDescriptionFile(Optional<? extends Path> optional)
    Copy the current immutable object by setting an optional value for the `typeDescriptionFile` attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning `this`.
    Parameters:
      `optional` - An optional value for typeDescriptionFile
    Returns:
      A modified copy or `this` if not changed

  - ### equals

    public boolean equals(Object another)
    This instance is equal to all instances of `XSProcessorRequest` 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: `outputDirectory`, `sourceFile`, `task`, `stylesheet`, `writeResources`, `traceFile`, `messageFile`, `brandingFile`, `outputName`, `typeDescriptionFile`.
    Overrides:
      `hashCode` in class `Object`
    Returns:
      hashCode value

  - ### toString

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

  - ### copyOf

    public static XSProcessorRequest copyOf(XSProcessorRequestType instance)
    Creates an immutable copy of a `XSProcessorRequestType` 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 XSProcessorRequest instance

  - ### builder

    public static XSProcessorRequest.Builder builder()
    Creates a builder for `XSProcessorRequest`.

        XSProcessorRequest.builder()
           .setOutputDirectory(java.nio.file.Path) // required outputDirectory
           .setSourceFile(java.nio.file.Path) // required sourceFile
           .setTask(com.io7m.xstructural.api.XSProcessorRequestType.Task) // optional task
           .setStylesheet(com.io7m.xstructural.api.XSProcessorRequestType.Stylesheet) // optional stylesheet
           .setWriteResources(boolean) // optional writeResources
           .setTraceFile(java.nio.file.Path) // optional traceFile
           .setMessageFile(java.nio.file.Path) // optional messageFile
           .setBrandingFile(Optional<java.nio.file.Path>) // optional brandingFile
           .setOutputName(Optional<String>) // optional outputName
           .setTypeDescriptionFile(Optional<java.nio.file.Path>) // optional typeDescriptionFile
           .build();

    Returns:
      A new XSProcessorRequest builder