java.lang.Object
com.google.genai.gaos.models.interactions.Status

public class Status extends Object
Status

The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details.

You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).

  • Constructor Details

  • Method Details

    • code

      public Optional<Integer> code()
      The status code, which should be an enum value of google.rpc.Code.
    • details

      public Optional<List<Map<String,Object>>> details()
      A list of messages that carry the error details. There is a common set of message types for APIs to use.
    • message

      public Optional<String> message()
      A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    • builder

      public static Status.Builder builder()
    • withCode

      public Status withCode(@Nullable Integer code)
      The status code, which should be an enum value of google.rpc.Code.
    • withDetails

      public Status withDetails(@Nullable List<Map<String,Object>> details)
      A list of messages that carry the error details. There is a common set of message types for APIs to use.
    • withMessage

      public Status withMessage(@Nullable String message)
      A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object