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

com.nextbreakpoint.flinkclient.model.JobStatus Maven / Gradle / Ivy

The newest version!
/*
 * This file is part of FlinkClient
 * https://github.com/nextbreakpoint/flinkclient
 *
 * OpenAPI spec version: v1/1.20-SNAPSHOT
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
package com.nextbreakpoint.flinkclient.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;

/**
 * Gets or Sets JobStatus
 */
@JsonAdapter(JobStatus.Adapter.class)
public enum JobStatus {
  @SerializedName("INITIALIZING")
  INITIALIZING("INITIALIZING"),
  @SerializedName("CREATED")
  CREATED("CREATED"),
  @SerializedName("RUNNING")
  RUNNING("RUNNING"),
  @SerializedName("FAILING")
  FAILING("FAILING"),
  @SerializedName("FAILED")
  FAILED("FAILED"),
  @SerializedName("CANCELLING")
  CANCELLING("CANCELLING"),
  @SerializedName("CANCELED")
  CANCELED("CANCELED"),
  @SerializedName("FINISHED")
  FINISHED("FINISHED"),
  @SerializedName("RESTARTING")
  RESTARTING("RESTARTING"),
  @SerializedName("SUSPENDED")
  SUSPENDED("SUSPENDED"),
  @SerializedName("RECONCILING")
  RECONCILING("RECONCILING");

  private String value;

  JobStatus(String value) {
    this.value = value;
  }

  public String getValue() {
    return value;
  }

  @Override
  public String toString() {
    return String.valueOf(value);
  }

  public static JobStatus fromValue(String input) {
    for (JobStatus b : JobStatus.values()) {
      if (b.value.equals(input)) {
        return b;
      }
    }
    return null;
  }

  public static class Adapter extends TypeAdapter {
    @Override
    public void write(final JsonWriter jsonWriter, final JobStatus enumeration) throws IOException {
      jsonWriter.value(String.valueOf(enumeration.getValue()));
    }

    @Override
    public JobStatus read(final JsonReader jsonReader) throws IOException {
      Object value = jsonReader.nextString();
      return JobStatus.fromValue((String)(value));
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy