com.mathworks.mps.client.rest

## Class MATLABParams

- java.lang.Object
- - com.mathworks.mps.client.rest.MATLABParams

-     public class MATLABParams
      extends java.lang.Object

  This class creates the payload for the initial HTTP POST request. For more information, see POST Asynchronous Request.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `MWMarshalingRules` | `getMwMarshalingRules()` Returns an object of type `MWMarshalingRules`.
    `int` | `getNargout()` Returns the number of output arguments returned by the MATLAB function.
    `byte[]` | `getRequestBody()` Constructs a byte array corresponding to the HTTP request body.
    `java.lang.Class` | `getTargetType()` Returns the expected target type.
    `static MATLABParams` | `newInstance(int nargout, java.lang.Class targetType, MWMarshalingRules mwMarshalingRules, java.lang.Object... inputs)` Creates a MATLABParams object.
    `static MATLABParams` | `newInstance(int nargout, java.lang.Class targetType, java.lang.Object... inputs)` Creates a MATLABParams object.
    `void` | `writeTo(java.io.OutputStream outputStream)` Writes a byte array corresponding to the MatlabParams object to this output stream.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### newInstance

          public static MATLABParams newInstance(int nargout,
                                                 java.lang.Class targetType,
                                                 MWMarshalingRules mwMarshalingRules,
                                                 java.lang.Object... inputs)

      Creates a MATLABParams object.
      Parameters:
        `inputs` - Array of objects representing the inputs sent to the MATLAB function deployed on MATLAB Production Server
        `nargout` - Expected number of output arguments
        `targetType` - Expected target output type
        `mwMarshalingRules` - Marshaling rules that contain a list of Java classes marshaled as MATLAB structures; if null, use the overloaded newInstance method

    - #### newInstance

          public static MATLABParams newInstance(int nargout,
                                                 java.lang.Class targetType,
                                                 java.lang.Object... inputs)

      Creates a MATLABParams object.
      Parameters:
        `inputs` - Array of objects representing the inputs sent to the MATLAB function deployed on MATLAB Production Server
        `nargout` - Expected number of output arguments
        `targetType` - Expected target output type

    - #### getNargout

          public int getNargout()

      Returns the number of output arguments returned by the MATLAB function.
      Returns:
        int

    - #### getTargetType

          public java.lang.Class getTargetType()

      Returns the expected target type.
      Returns:
        Class

    - #### getMwMarshalingRules

          public MWMarshalingRules getMwMarshalingRules()

      Returns an object of type `MWMarshalingRules`.
      Returns:
        MWMarshallingRules

    - #### getRequestBody

          public byte[] getRequestBody()

      Constructs a byte array corresponding to the HTTP request body. Call this method after you construct the MATLABParams object with the required parameters.
      Returns:
        byte array used in the HTTP request body

    - #### writeTo

          public void writeTo(java.io.OutputStream outputStream)
                       throws java.io.IOException

      Writes a byte array corresponding to the MatlabParams object to this output stream.
      Parameters:
        `outputStream` -
      Throws:
        `java.io.IOException`

Copyright 2010-2022 The MathWorks, Inc.