Sha256: 5c81a33f755199d806c1fbe3c8f3d4a5ed09b56c3b0ca6a68f0e16bc88aa473f
Contents?: true
Size: 1.19 KB
Versions: 5
Compression:
Stored size: 1.19 KB
Contents
package org.embulk.input.zendesk.models; import com.fasterxml.jackson.annotation.JsonCreator; import org.embulk.config.ConfigException; import java.util.Arrays; public enum Target { /** For ticket_metrics - we fetch by using include metric_sets with ticket target * so the jsonName is different comparing to the target name */ TICKETS("tickets"), USERS("users"), ORGANIZATIONS("organizations"), TICKET_EVENTS("ticket_events"), TICKET_METRICS("metric_sets"), TICKET_FIELDS("ticket_fields"), TICKET_FORMS("ticket_forms"); String jsonName; Target(String jsonName) { this.jsonName = jsonName; } @JsonCreator public static Target fromString(final String value) { try { return Target.valueOf(value.trim().toUpperCase()); } catch (IllegalArgumentException e) { throw new ConfigException("Unsupported target '" + value + "', supported values: '" + Arrays.toString(Target.values()) + "'"); } } @Override public String toString() { return this.name().trim().toLowerCase(); } public String getJsonName() { return this.jsonName; } }
Version data entries
5 entries across 5 versions & 1 rubygems