All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alibaba.dashscope.threads.runs.RunStep Maven / Gradle / Ivy

The newest version!
package com.alibaba.dashscope.threads.runs;

import com.alibaba.dashscope.common.FlattenResultBase;
import com.google.gson.annotations.SerializedName;
import java.util.HashMap;
import java.util.Map;
import lombok.Data;
import lombok.EqualsAndHashCode;

/** RunStep */
@Data
@EqualsAndHashCode(callSuper = true)
public class RunStep extends FlattenResultBase {

  /**
   * Id
   *
   * 

(Required) */ @SerializedName("id") private String id; /** * Object * *

(Required) */ @SerializedName("object") private String object; /** * Created At * *

(Required) */ @SerializedName("created_at") private Long createdAt; /** * Assistant Id * *

(Required) */ @SerializedName("assistant_id") private String assistantId; /** * Thread Id * *

(Required) */ @SerializedName("thread_id") private String threadId; /** * Run Id * *

(Required) */ @SerializedName("run_id") private String runId; /** * Type * *

(Required) */ @SerializedName("type") private RunStep.Type type; /** * Status * *

(Required) */ @SerializedName("status") private RunStep.Status status; /** * Step Details * *

(Required) */ @SerializedName("step_details") private StepDetailBase stepDetails; @SerializedName("last_error") private LastError lastError = null; /** Expired At */ @SerializedName("expired_at") private Integer expiredAt = null; /** Cancelled At */ @SerializedName("cancelled_at") private Integer cancelledAt = null; /** Failed At */ @SerializedName("failed_at") private Integer failedAt = null; /** Completed At */ @SerializedName("completed_at") private Integer completedAt = null; /** Metadata */ @SerializedName("metadata") private Map metadata = null; @SerializedName("usage") private Usage usage = null; /** Status */ public enum Status { @SerializedName("in_progress") IN_PROGRESS("in_progress"), @SerializedName("cancelled") CANCELLED("cancelled"), @SerializedName("failed") FAILED("failed"), @SerializedName("completed") COMPLETED("completed"), @SerializedName("expired") EXPIRED("expired"); private final String value; private static final Map CONSTANTS = new HashMap(); static { for (RunStep.Status c : values()) { CONSTANTS.put(c.value, c); } } Status(String value) { this.value = value; } @Override public String toString() { return this.value; } public String value() { return this.value; } public static RunStep.Status fromValue(String value) { RunStep.Status constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } /** Type */ public enum Type { @SerializedName("message_creation") MESSAGE_CREATION("message_creation"), @SerializedName("tool_calls") TOOL_CALLS("tool_calls"); private final String value; private static final Map CONSTANTS = new HashMap(); static { for (RunStep.Type c : values()) { CONSTANTS.put(c.value, c); } } Type(String value) { this.value = value; } @Override public String toString() { return this.value; } public String value() { return this.value; } public static RunStep.Type fromValue(String value) { RunStep.Type constant = CONSTANTS.get(value); if (constant == null) { throw new IllegalArgumentException(value); } else { return constant; } } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy