io.milvus.param

## Class R<T>

- java.lang.Object
- - io.milvus.param.R<T>

-     public class R<T>
      extends java.lang.Object

  Utility class to wrap gpc response and exceptions.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `R.Status` Represents server and client side status code

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `R()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> R<T>` | `failed(io.milvus.grpc.ErrorCode errorCode, java.lang.String msg)` Wraps an error code and error message for failure.
    `static <T> R<T>` | `failed(java.lang.Exception exception)` Wraps an exception for failure.
    `static <T> R<T>` | `failed(R.Status statusCode, java.lang.String msg)` Wraps a status code and error message for failure.
    `T` | `getData()`
    `java.lang.Exception` | `getException()`
    `java.lang.String` | `getMessage()`
    `java.lang.Integer` | `getStatus()`
    `void` | `setData(T data)`
    `void` | `setException(java.lang.Exception exception)`
    `void` | `setStatus(java.lang.Integer status)`
    `static <T> R<T>` | `success()` Returns a succeed status.
    `static <T> R<T>` | `success(T data)` Wraps a succeed rpc response object.
    `java.lang.String` | `toString()` Constructs a `String` by `R` instance.

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### R

          public R()

  - ### Method Detail

    - #### getException

          public java.lang.Exception getException()

    - #### setException

          public void setException(java.lang.Exception exception)

    - #### getMessage

          public java.lang.String getMessage()

    - #### getStatus

          public java.lang.Integer getStatus()

    - #### setStatus

          public void setStatus(java.lang.Integer status)

    - #### getData

          public T getData()

    - #### setData

          public void setData(T data)

    - #### failed

          public static <T> R<T> failed(java.lang.Exception exception)

      Wraps an exception for failure.
      Parameters:
        `exception` - exception object
      Returns:
        `R`

    - #### failed

          public static <T> R<T> failed(io.milvus.grpc.ErrorCode errorCode,
                                        java.lang.String msg)

      Wraps an error code and error message for failure.
      Parameters:
        `errorCode` - rpc error code
        `msg` - error message
      Returns:
        `R`

    - #### failed

          public static <T> R<T> failed(R.Status statusCode,
                                        java.lang.String msg)

      Wraps a status code and error message for failure.
      Parameters:
        `statusCode` - status code
        `msg` - error message
      Returns:
        `R`

    - #### success

          public static <T> R<T> success()

      Returns a succeed status.
      Returns:
        `R`

    - #### success

          public static <T> R<T> success(T data)

      Wraps a succeed rpc response object.
      Parameters:
        `data` - rpc response object
      Returns:
        `R`

    - #### toString

          public java.lang.String toString()

      Constructs a `String` by `R` instance.
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        `String`