com.zuora.model.CustomObjectBulkJobResponseStatus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zuora-sdk-java Show documentation
Show all versions of zuora-sdk-java Show documentation
The SDK of JAVA language for Zuora pricing system
/*
* Zuora API Reference
* REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
*
* The version of the OpenAPI document: 2024-05-20
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.zuora.model;
import java.util.Objects;
import com.google.gson.annotations.SerializedName;
import java.io.IOException;
import com.google.gson.TypeAdapter;
import com.google.gson.JsonElement;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
/**
* The status of the bulk job: - `accepted` - The job has been accepted and is ready to process. - `pending` - The job is waiting for your input. You can use [Upload a file for a custom object bulk job](https://www.zuora.com/developer/api-references/api/operation/Post_UploadFileForCustomObjectBulkJob) to upload a file so that the job can start creating records. - `in_progress` - The job is processing. - `completed` - The job has completed. - `failed` - The job was unable to complete. You can use [List all errors for a custom object bulk job](https://www.zuora.com/developer/api-references/api/operation/Get_CustomObjectBulkJobErrors) to list the errors. - `cancelled` - The job was cancelled by the server.
*/
@JsonAdapter(CustomObjectBulkJobResponseStatus.Adapter.class)
public enum CustomObjectBulkJobResponseStatus {
ACCEPTED("accepted"),
PENDING("pending"),
IN_PROGRESS("in_progress"),
COMPLETED("completed"),
FAILED("failed"),
CANCELLED("cancelled");
private String value;
CustomObjectBulkJobResponseStatus(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static CustomObjectBulkJobResponseStatus fromValue(String value) {
for (CustomObjectBulkJobResponseStatus b : CustomObjectBulkJobResponseStatus.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final CustomObjectBulkJobResponseStatus enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CustomObjectBulkJobResponseStatus read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CustomObjectBulkJobResponseStatus.fromValue(value);
}
}
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
String value = jsonElement.getAsString();
CustomObjectBulkJobResponseStatus.fromValue(value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy