software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValue Maven / Gradle / Ivy
The newest version!
/*
* The Jira Cloud platform REST API
* Jira Cloud platform REST API documentation
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
* 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 software.tnb.jira.validation.generated.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueCascadingOption;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueDate;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueDateTime;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueFloat;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeDateTimeField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeGroupField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeMultiGroupField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeMultiStringField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeMultiUserField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeNumberField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeObjectField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeStringField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueForgeUserField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueLabels;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueMultiUserPicker;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueMultipleGroupPicker;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueMultipleOption;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueMultipleVersionPicker;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueProject;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueReadOnly;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueSingleGroupPicker;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueSingleOption;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueSingleVersionPicker;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueTextArea;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueTextField;
import software.tnb.jira.validation.generated.model.CustomFieldContextDefaultValueURL;
import software.tnb.jira.validation.generated.model.CustomFieldContextSingleUserPickerDefaults;
import software.tnb.jira.validation.generated.model.UserFilter;
import java.io.IOException;
import java.lang.reflect.Type;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.JsonPrimitive;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.JsonParseException;
import software.tnb.jira.validation.generated.JSON;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-11-09T10:37:50.591249290Z[Etc/UTC]")
public class CustomFieldContextDefaultValue extends AbstractOpenApiSchema {
private static final Logger log = Logger.getLogger(CustomFieldContextDefaultValue.class.getName());
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
if (!CustomFieldContextDefaultValue.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'CustomFieldContextDefaultValue' and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter adapterCustomFieldContextDefaultValueCascadingOption = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueCascadingOption.class));
final TypeAdapter adapterCustomFieldContextDefaultValueMultipleOption = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueMultipleOption.class));
final TypeAdapter adapterCustomFieldContextDefaultValueSingleOption = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueSingleOption.class));
final TypeAdapter adapterCustomFieldContextSingleUserPickerDefaults = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextSingleUserPickerDefaults.class));
final TypeAdapter adapterCustomFieldContextDefaultValueMultiUserPicker = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueMultiUserPicker.class));
final TypeAdapter adapterCustomFieldContextDefaultValueSingleGroupPicker = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueSingleGroupPicker.class));
final TypeAdapter adapterCustomFieldContextDefaultValueMultipleGroupPicker = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueMultipleGroupPicker.class));
final TypeAdapter adapterCustomFieldContextDefaultValueDate = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueDate.class));
final TypeAdapter adapterCustomFieldContextDefaultValueDateTime = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueDateTime.class));
final TypeAdapter adapterCustomFieldContextDefaultValueURL = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueURL.class));
final TypeAdapter adapterCustomFieldContextDefaultValueProject = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueProject.class));
final TypeAdapter adapterCustomFieldContextDefaultValueFloat = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueFloat.class));
final TypeAdapter adapterCustomFieldContextDefaultValueLabels = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueLabels.class));
final TypeAdapter adapterCustomFieldContextDefaultValueTextField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueTextField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueTextArea = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueTextArea.class));
final TypeAdapter adapterCustomFieldContextDefaultValueReadOnly = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueReadOnly.class));
final TypeAdapter adapterCustomFieldContextDefaultValueSingleVersionPicker = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueSingleVersionPicker.class));
final TypeAdapter adapterCustomFieldContextDefaultValueMultipleVersionPicker = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueMultipleVersionPicker.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeStringField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeStringField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeMultiStringField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeMultiStringField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeObjectField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeObjectField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeDateTimeField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeDateTimeField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeGroupField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeGroupField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeMultiGroupField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeMultiGroupField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeNumberField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeNumberField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeUserField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeUserField.class));
final TypeAdapter adapterCustomFieldContextDefaultValueForgeMultiUserField = gson.getDelegateAdapter(this, TypeToken.get(CustomFieldContextDefaultValueForgeMultiUserField.class));
return (TypeAdapter) new TypeAdapter() {
@Override
public void write(JsonWriter out, CustomFieldContextDefaultValue value) throws IOException {
if (value == null || value.getActualInstance() == null) {
elementAdapter.write(out, null);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueCascadingOption`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueCascadingOption) {
JsonElement element = adapterCustomFieldContextDefaultValueCascadingOption.toJsonTree((CustomFieldContextDefaultValueCascadingOption)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueMultipleOption`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueMultipleOption) {
JsonElement element = adapterCustomFieldContextDefaultValueMultipleOption.toJsonTree((CustomFieldContextDefaultValueMultipleOption)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueSingleOption`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueSingleOption) {
JsonElement element = adapterCustomFieldContextDefaultValueSingleOption.toJsonTree((CustomFieldContextDefaultValueSingleOption)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextSingleUserPickerDefaults`
if (value.getActualInstance() instanceof CustomFieldContextSingleUserPickerDefaults) {
JsonElement element = adapterCustomFieldContextSingleUserPickerDefaults.toJsonTree((CustomFieldContextSingleUserPickerDefaults)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueMultiUserPicker`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueMultiUserPicker) {
JsonElement element = adapterCustomFieldContextDefaultValueMultiUserPicker.toJsonTree((CustomFieldContextDefaultValueMultiUserPicker)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueSingleGroupPicker`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueSingleGroupPicker) {
JsonElement element = adapterCustomFieldContextDefaultValueSingleGroupPicker.toJsonTree((CustomFieldContextDefaultValueSingleGroupPicker)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueMultipleGroupPicker`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueMultipleGroupPicker) {
JsonElement element = adapterCustomFieldContextDefaultValueMultipleGroupPicker.toJsonTree((CustomFieldContextDefaultValueMultipleGroupPicker)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueDate`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueDate) {
JsonElement element = adapterCustomFieldContextDefaultValueDate.toJsonTree((CustomFieldContextDefaultValueDate)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueDateTime`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueDateTime) {
JsonElement element = adapterCustomFieldContextDefaultValueDateTime.toJsonTree((CustomFieldContextDefaultValueDateTime)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueURL`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueURL) {
JsonElement element = adapterCustomFieldContextDefaultValueURL.toJsonTree((CustomFieldContextDefaultValueURL)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueProject`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueProject) {
JsonElement element = adapterCustomFieldContextDefaultValueProject.toJsonTree((CustomFieldContextDefaultValueProject)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueFloat`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueFloat) {
JsonElement element = adapterCustomFieldContextDefaultValueFloat.toJsonTree((CustomFieldContextDefaultValueFloat)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueLabels`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueLabels) {
JsonElement element = adapterCustomFieldContextDefaultValueLabels.toJsonTree((CustomFieldContextDefaultValueLabels)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueTextField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueTextField) {
JsonElement element = adapterCustomFieldContextDefaultValueTextField.toJsonTree((CustomFieldContextDefaultValueTextField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueTextArea`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueTextArea) {
JsonElement element = adapterCustomFieldContextDefaultValueTextArea.toJsonTree((CustomFieldContextDefaultValueTextArea)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueReadOnly`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueReadOnly) {
JsonElement element = adapterCustomFieldContextDefaultValueReadOnly.toJsonTree((CustomFieldContextDefaultValueReadOnly)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueSingleVersionPicker`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueSingleVersionPicker) {
JsonElement element = adapterCustomFieldContextDefaultValueSingleVersionPicker.toJsonTree((CustomFieldContextDefaultValueSingleVersionPicker)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueMultipleVersionPicker`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueMultipleVersionPicker) {
JsonElement element = adapterCustomFieldContextDefaultValueMultipleVersionPicker.toJsonTree((CustomFieldContextDefaultValueMultipleVersionPicker)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeStringField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeStringField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeStringField.toJsonTree((CustomFieldContextDefaultValueForgeStringField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeMultiStringField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeMultiStringField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeMultiStringField.toJsonTree((CustomFieldContextDefaultValueForgeMultiStringField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeObjectField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeObjectField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeObjectField.toJsonTree((CustomFieldContextDefaultValueForgeObjectField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeDateTimeField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeDateTimeField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeDateTimeField.toJsonTree((CustomFieldContextDefaultValueForgeDateTimeField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeGroupField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeGroupField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeGroupField.toJsonTree((CustomFieldContextDefaultValueForgeGroupField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeMultiGroupField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeMultiGroupField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeMultiGroupField.toJsonTree((CustomFieldContextDefaultValueForgeMultiGroupField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeNumberField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeNumberField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeNumberField.toJsonTree((CustomFieldContextDefaultValueForgeNumberField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeUserField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeUserField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeUserField.toJsonTree((CustomFieldContextDefaultValueForgeUserField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
// check if the actual instance is of the type `CustomFieldContextDefaultValueForgeMultiUserField`
if (value.getActualInstance() instanceof CustomFieldContextDefaultValueForgeMultiUserField) {
JsonElement element = adapterCustomFieldContextDefaultValueForgeMultiUserField.toJsonTree((CustomFieldContextDefaultValueForgeMultiUserField)value.getActualInstance());
elementAdapter.write(out, element);
return;
}
throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults");
}
@Override
public CustomFieldContextDefaultValue read(JsonReader in) throws IOException {
Object deserialized = null;
JsonElement jsonElement = elementAdapter.read(in);
int match = 0;
ArrayList errorMessages = new ArrayList<>();
TypeAdapter actualAdapter = elementAdapter;
// deserialize CustomFieldContextDefaultValueCascadingOption
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueCascadingOption.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueCascadingOption;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueCascadingOption'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueCascadingOption failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueCascadingOption'", e);
}
// deserialize CustomFieldContextDefaultValueMultipleOption
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueMultipleOption.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueMultipleOption;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueMultipleOption'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleOption failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueMultipleOption'", e);
}
// deserialize CustomFieldContextDefaultValueSingleOption
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueSingleOption.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueSingleOption;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueSingleOption'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleOption failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueSingleOption'", e);
}
// deserialize CustomFieldContextSingleUserPickerDefaults
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextSingleUserPickerDefaults.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextSingleUserPickerDefaults;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextSingleUserPickerDefaults'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextSingleUserPickerDefaults failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextSingleUserPickerDefaults'", e);
}
// deserialize CustomFieldContextDefaultValueMultiUserPicker
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueMultiUserPicker.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueMultiUserPicker;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueMultiUserPicker'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultiUserPicker failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueMultiUserPicker'", e);
}
// deserialize CustomFieldContextDefaultValueSingleGroupPicker
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueSingleGroupPicker.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueSingleGroupPicker;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueSingleGroupPicker'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleGroupPicker failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueSingleGroupPicker'", e);
}
// deserialize CustomFieldContextDefaultValueMultipleGroupPicker
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueMultipleGroupPicker.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueMultipleGroupPicker;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueMultipleGroupPicker'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleGroupPicker failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueMultipleGroupPicker'", e);
}
// deserialize CustomFieldContextDefaultValueDate
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueDate.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueDate;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueDate'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueDate failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueDate'", e);
}
// deserialize CustomFieldContextDefaultValueDateTime
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueDateTime.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueDateTime;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueDateTime'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueDateTime failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueDateTime'", e);
}
// deserialize CustomFieldContextDefaultValueURL
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueURL.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueURL;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueURL'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueURL failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueURL'", e);
}
// deserialize CustomFieldContextDefaultValueProject
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueProject.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueProject;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueProject'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueProject failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueProject'", e);
}
// deserialize CustomFieldContextDefaultValueFloat
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueFloat.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueFloat;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueFloat'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueFloat failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueFloat'", e);
}
// deserialize CustomFieldContextDefaultValueLabels
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueLabels.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueLabels;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueLabels'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueLabels failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueLabels'", e);
}
// deserialize CustomFieldContextDefaultValueTextField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueTextField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueTextField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueTextField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueTextField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueTextField'", e);
}
// deserialize CustomFieldContextDefaultValueTextArea
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueTextArea.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueTextArea;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueTextArea'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueTextArea failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueTextArea'", e);
}
// deserialize CustomFieldContextDefaultValueReadOnly
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueReadOnly.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueReadOnly;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueReadOnly'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueReadOnly failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueReadOnly'", e);
}
// deserialize CustomFieldContextDefaultValueSingleVersionPicker
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueSingleVersionPicker.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueSingleVersionPicker;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueSingleVersionPicker'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleVersionPicker failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueSingleVersionPicker'", e);
}
// deserialize CustomFieldContextDefaultValueMultipleVersionPicker
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueMultipleVersionPicker.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueMultipleVersionPicker;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueMultipleVersionPicker'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleVersionPicker failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueMultipleVersionPicker'", e);
}
// deserialize CustomFieldContextDefaultValueForgeStringField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeStringField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeStringField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeStringField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeStringField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeStringField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeMultiStringField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeMultiStringField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeMultiStringField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeMultiStringField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiStringField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeMultiStringField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeObjectField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeObjectField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeObjectField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeObjectField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeObjectField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeObjectField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeDateTimeField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeDateTimeField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeDateTimeField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeDateTimeField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeDateTimeField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeDateTimeField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeGroupField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeGroupField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeGroupField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeGroupField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeGroupField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeGroupField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeMultiGroupField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeMultiGroupField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeMultiGroupField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeMultiGroupField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiGroupField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeMultiGroupField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeNumberField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeNumberField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeNumberField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeNumberField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeNumberField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeNumberField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeUserField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeUserField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeUserField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeUserField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeUserField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeUserField'", e);
}
// deserialize CustomFieldContextDefaultValueForgeMultiUserField
try {
// validate the JSON object to see if any exception is thrown
CustomFieldContextDefaultValueForgeMultiUserField.validateJsonElement(jsonElement);
actualAdapter = adapterCustomFieldContextDefaultValueForgeMultiUserField;
match++;
log.log(Level.FINER, "Input data matches schema 'CustomFieldContextDefaultValueForgeMultiUserField'");
} catch (Exception e) {
// deserialization failed, continue
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiUserField failed with `%s`.", e.getMessage()));
log.log(Level.FINER, "Input data does not match schema 'CustomFieldContextDefaultValueForgeMultiUserField'", e);
}
if (match == 1) {
CustomFieldContextDefaultValue ret = new CustomFieldContextDefaultValue();
ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement));
return ret;
}
throw new IOException(String.format("Failed deserialization for CustomFieldContextDefaultValue: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", match, errorMessages, jsonElement.toString()));
}
}.nullSafe();
}
}
// store a list of schema names defined in oneOf
public static final Map> schemas = new HashMap>();
public CustomFieldContextDefaultValue() {
super("oneOf", Boolean.FALSE);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueCascadingOption o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueDate o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueDateTime o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueFloat o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeDateTimeField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeGroupField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeMultiGroupField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeMultiStringField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeMultiUserField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeNumberField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeObjectField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeStringField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueForgeUserField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueLabels o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueMultiUserPicker o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueMultipleGroupPicker o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueMultipleOption o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueMultipleVersionPicker o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueProject o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueReadOnly o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueSingleGroupPicker o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueSingleOption o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueSingleVersionPicker o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueTextArea o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueTextField o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextDefaultValueURL o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
public CustomFieldContextDefaultValue(CustomFieldContextSingleUserPickerDefaults o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}
static {
schemas.put("CustomFieldContextDefaultValueCascadingOption", CustomFieldContextDefaultValueCascadingOption.class);
schemas.put("CustomFieldContextDefaultValueMultipleOption", CustomFieldContextDefaultValueMultipleOption.class);
schemas.put("CustomFieldContextDefaultValueSingleOption", CustomFieldContextDefaultValueSingleOption.class);
schemas.put("CustomFieldContextSingleUserPickerDefaults", CustomFieldContextSingleUserPickerDefaults.class);
schemas.put("CustomFieldContextDefaultValueMultiUserPicker", CustomFieldContextDefaultValueMultiUserPicker.class);
schemas.put("CustomFieldContextDefaultValueSingleGroupPicker", CustomFieldContextDefaultValueSingleGroupPicker.class);
schemas.put("CustomFieldContextDefaultValueMultipleGroupPicker", CustomFieldContextDefaultValueMultipleGroupPicker.class);
schemas.put("CustomFieldContextDefaultValueDate", CustomFieldContextDefaultValueDate.class);
schemas.put("CustomFieldContextDefaultValueDateTime", CustomFieldContextDefaultValueDateTime.class);
schemas.put("CustomFieldContextDefaultValueURL", CustomFieldContextDefaultValueURL.class);
schemas.put("CustomFieldContextDefaultValueProject", CustomFieldContextDefaultValueProject.class);
schemas.put("CustomFieldContextDefaultValueFloat", CustomFieldContextDefaultValueFloat.class);
schemas.put("CustomFieldContextDefaultValueLabels", CustomFieldContextDefaultValueLabels.class);
schemas.put("CustomFieldContextDefaultValueTextField", CustomFieldContextDefaultValueTextField.class);
schemas.put("CustomFieldContextDefaultValueTextArea", CustomFieldContextDefaultValueTextArea.class);
schemas.put("CustomFieldContextDefaultValueReadOnly", CustomFieldContextDefaultValueReadOnly.class);
schemas.put("CustomFieldContextDefaultValueSingleVersionPicker", CustomFieldContextDefaultValueSingleVersionPicker.class);
schemas.put("CustomFieldContextDefaultValueMultipleVersionPicker", CustomFieldContextDefaultValueMultipleVersionPicker.class);
schemas.put("CustomFieldContextDefaultValueForgeStringField", CustomFieldContextDefaultValueForgeStringField.class);
schemas.put("CustomFieldContextDefaultValueForgeMultiStringField", CustomFieldContextDefaultValueForgeMultiStringField.class);
schemas.put("CustomFieldContextDefaultValueForgeObjectField", CustomFieldContextDefaultValueForgeObjectField.class);
schemas.put("CustomFieldContextDefaultValueForgeDateTimeField", CustomFieldContextDefaultValueForgeDateTimeField.class);
schemas.put("CustomFieldContextDefaultValueForgeGroupField", CustomFieldContextDefaultValueForgeGroupField.class);
schemas.put("CustomFieldContextDefaultValueForgeMultiGroupField", CustomFieldContextDefaultValueForgeMultiGroupField.class);
schemas.put("CustomFieldContextDefaultValueForgeNumberField", CustomFieldContextDefaultValueForgeNumberField.class);
schemas.put("CustomFieldContextDefaultValueForgeUserField", CustomFieldContextDefaultValueForgeUserField.class);
schemas.put("CustomFieldContextDefaultValueForgeMultiUserField", CustomFieldContextDefaultValueForgeMultiUserField.class);
}
@Override
public Map> getSchemas() {
return CustomFieldContextDefaultValue.schemas;
}
/**
* Set the instance that matches the oneOf child schema, check
* the instance parameter is valid against the oneOf child schemas:
* CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults
*
* It could be an instance of the 'oneOf' schemas.
*/
@Override
public void setActualInstance(Object instance) {
if (instance instanceof CustomFieldContextDefaultValueCascadingOption) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueMultipleOption) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueSingleOption) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextSingleUserPickerDefaults) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueMultiUserPicker) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueSingleGroupPicker) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueMultipleGroupPicker) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueDate) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueDateTime) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueURL) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueProject) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueFloat) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueLabels) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueTextField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueTextArea) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueReadOnly) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueSingleVersionPicker) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueMultipleVersionPicker) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeStringField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeMultiStringField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeObjectField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeDateTimeField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeGroupField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeMultiGroupField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeNumberField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeUserField) {
super.setActualInstance(instance);
return;
}
if (instance instanceof CustomFieldContextDefaultValueForgeMultiUserField) {
super.setActualInstance(instance);
return;
}
throw new RuntimeException("Invalid instance type. Must be CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults");
}
/**
* Get the actual instance, which can be the following:
* CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults
*
* @return The actual instance (CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults)
*/
@Override
public Object getActualInstance() {
return super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueCascadingOption`. If the actual instance is not `CustomFieldContextDefaultValueCascadingOption`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueCascadingOption`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueCascadingOption`
*/
public CustomFieldContextDefaultValueCascadingOption getCustomFieldContextDefaultValueCascadingOption() throws ClassCastException {
return (CustomFieldContextDefaultValueCascadingOption)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueMultipleOption`. If the actual instance is not `CustomFieldContextDefaultValueMultipleOption`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueMultipleOption`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueMultipleOption`
*/
public CustomFieldContextDefaultValueMultipleOption getCustomFieldContextDefaultValueMultipleOption() throws ClassCastException {
return (CustomFieldContextDefaultValueMultipleOption)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueSingleOption`. If the actual instance is not `CustomFieldContextDefaultValueSingleOption`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueSingleOption`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueSingleOption`
*/
public CustomFieldContextDefaultValueSingleOption getCustomFieldContextDefaultValueSingleOption() throws ClassCastException {
return (CustomFieldContextDefaultValueSingleOption)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextSingleUserPickerDefaults`. If the actual instance is not `CustomFieldContextSingleUserPickerDefaults`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextSingleUserPickerDefaults`
* @throws ClassCastException if the instance is not `CustomFieldContextSingleUserPickerDefaults`
*/
public CustomFieldContextSingleUserPickerDefaults getCustomFieldContextSingleUserPickerDefaults() throws ClassCastException {
return (CustomFieldContextSingleUserPickerDefaults)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueMultiUserPicker`. If the actual instance is not `CustomFieldContextDefaultValueMultiUserPicker`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueMultiUserPicker`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueMultiUserPicker`
*/
public CustomFieldContextDefaultValueMultiUserPicker getCustomFieldContextDefaultValueMultiUserPicker() throws ClassCastException {
return (CustomFieldContextDefaultValueMultiUserPicker)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueSingleGroupPicker`. If the actual instance is not `CustomFieldContextDefaultValueSingleGroupPicker`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueSingleGroupPicker`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueSingleGroupPicker`
*/
public CustomFieldContextDefaultValueSingleGroupPicker getCustomFieldContextDefaultValueSingleGroupPicker() throws ClassCastException {
return (CustomFieldContextDefaultValueSingleGroupPicker)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueMultipleGroupPicker`. If the actual instance is not `CustomFieldContextDefaultValueMultipleGroupPicker`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueMultipleGroupPicker`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueMultipleGroupPicker`
*/
public CustomFieldContextDefaultValueMultipleGroupPicker getCustomFieldContextDefaultValueMultipleGroupPicker() throws ClassCastException {
return (CustomFieldContextDefaultValueMultipleGroupPicker)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueDate`. If the actual instance is not `CustomFieldContextDefaultValueDate`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueDate`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueDate`
*/
public CustomFieldContextDefaultValueDate getCustomFieldContextDefaultValueDate() throws ClassCastException {
return (CustomFieldContextDefaultValueDate)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueDateTime`. If the actual instance is not `CustomFieldContextDefaultValueDateTime`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueDateTime`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueDateTime`
*/
public CustomFieldContextDefaultValueDateTime getCustomFieldContextDefaultValueDateTime() throws ClassCastException {
return (CustomFieldContextDefaultValueDateTime)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueURL`. If the actual instance is not `CustomFieldContextDefaultValueURL`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueURL`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueURL`
*/
public CustomFieldContextDefaultValueURL getCustomFieldContextDefaultValueURL() throws ClassCastException {
return (CustomFieldContextDefaultValueURL)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueProject`. If the actual instance is not `CustomFieldContextDefaultValueProject`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueProject`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueProject`
*/
public CustomFieldContextDefaultValueProject getCustomFieldContextDefaultValueProject() throws ClassCastException {
return (CustomFieldContextDefaultValueProject)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueFloat`. If the actual instance is not `CustomFieldContextDefaultValueFloat`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueFloat`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueFloat`
*/
public CustomFieldContextDefaultValueFloat getCustomFieldContextDefaultValueFloat() throws ClassCastException {
return (CustomFieldContextDefaultValueFloat)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueLabels`. If the actual instance is not `CustomFieldContextDefaultValueLabels`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueLabels`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueLabels`
*/
public CustomFieldContextDefaultValueLabels getCustomFieldContextDefaultValueLabels() throws ClassCastException {
return (CustomFieldContextDefaultValueLabels)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueTextField`. If the actual instance is not `CustomFieldContextDefaultValueTextField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueTextField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueTextField`
*/
public CustomFieldContextDefaultValueTextField getCustomFieldContextDefaultValueTextField() throws ClassCastException {
return (CustomFieldContextDefaultValueTextField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueTextArea`. If the actual instance is not `CustomFieldContextDefaultValueTextArea`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueTextArea`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueTextArea`
*/
public CustomFieldContextDefaultValueTextArea getCustomFieldContextDefaultValueTextArea() throws ClassCastException {
return (CustomFieldContextDefaultValueTextArea)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueReadOnly`. If the actual instance is not `CustomFieldContextDefaultValueReadOnly`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueReadOnly`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueReadOnly`
*/
public CustomFieldContextDefaultValueReadOnly getCustomFieldContextDefaultValueReadOnly() throws ClassCastException {
return (CustomFieldContextDefaultValueReadOnly)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueSingleVersionPicker`. If the actual instance is not `CustomFieldContextDefaultValueSingleVersionPicker`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueSingleVersionPicker`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueSingleVersionPicker`
*/
public CustomFieldContextDefaultValueSingleVersionPicker getCustomFieldContextDefaultValueSingleVersionPicker() throws ClassCastException {
return (CustomFieldContextDefaultValueSingleVersionPicker)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueMultipleVersionPicker`. If the actual instance is not `CustomFieldContextDefaultValueMultipleVersionPicker`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueMultipleVersionPicker`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueMultipleVersionPicker`
*/
public CustomFieldContextDefaultValueMultipleVersionPicker getCustomFieldContextDefaultValueMultipleVersionPicker() throws ClassCastException {
return (CustomFieldContextDefaultValueMultipleVersionPicker)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeStringField`. If the actual instance is not `CustomFieldContextDefaultValueForgeStringField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeStringField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeStringField`
*/
public CustomFieldContextDefaultValueForgeStringField getCustomFieldContextDefaultValueForgeStringField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeStringField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeMultiStringField`. If the actual instance is not `CustomFieldContextDefaultValueForgeMultiStringField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeMultiStringField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeMultiStringField`
*/
public CustomFieldContextDefaultValueForgeMultiStringField getCustomFieldContextDefaultValueForgeMultiStringField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeMultiStringField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeObjectField`. If the actual instance is not `CustomFieldContextDefaultValueForgeObjectField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeObjectField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeObjectField`
*/
public CustomFieldContextDefaultValueForgeObjectField getCustomFieldContextDefaultValueForgeObjectField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeObjectField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeDateTimeField`. If the actual instance is not `CustomFieldContextDefaultValueForgeDateTimeField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeDateTimeField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeDateTimeField`
*/
public CustomFieldContextDefaultValueForgeDateTimeField getCustomFieldContextDefaultValueForgeDateTimeField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeDateTimeField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeGroupField`. If the actual instance is not `CustomFieldContextDefaultValueForgeGroupField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeGroupField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeGroupField`
*/
public CustomFieldContextDefaultValueForgeGroupField getCustomFieldContextDefaultValueForgeGroupField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeGroupField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeMultiGroupField`. If the actual instance is not `CustomFieldContextDefaultValueForgeMultiGroupField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeMultiGroupField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeMultiGroupField`
*/
public CustomFieldContextDefaultValueForgeMultiGroupField getCustomFieldContextDefaultValueForgeMultiGroupField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeMultiGroupField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeNumberField`. If the actual instance is not `CustomFieldContextDefaultValueForgeNumberField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeNumberField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeNumberField`
*/
public CustomFieldContextDefaultValueForgeNumberField getCustomFieldContextDefaultValueForgeNumberField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeNumberField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeUserField`. If the actual instance is not `CustomFieldContextDefaultValueForgeUserField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeUserField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeUserField`
*/
public CustomFieldContextDefaultValueForgeUserField getCustomFieldContextDefaultValueForgeUserField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeUserField)super.getActualInstance();
}
/**
* Get the actual instance of `CustomFieldContextDefaultValueForgeMultiUserField`. If the actual instance is not `CustomFieldContextDefaultValueForgeMultiUserField`,
* the ClassCastException will be thrown.
*
* @return The actual instance of `CustomFieldContextDefaultValueForgeMultiUserField`
* @throws ClassCastException if the instance is not `CustomFieldContextDefaultValueForgeMultiUserField`
*/
public CustomFieldContextDefaultValueForgeMultiUserField getCustomFieldContextDefaultValueForgeMultiUserField() throws ClassCastException {
return (CustomFieldContextDefaultValueForgeMultiUserField)super.getActualInstance();
}
/**
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
* @throws IOException if the JSON Element is invalid with respect to CustomFieldContextDefaultValue
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
// validate oneOf schemas one by one
int validCount = 0;
ArrayList errorMessages = new ArrayList<>();
// validate the json string with CustomFieldContextDefaultValueCascadingOption
try {
CustomFieldContextDefaultValueCascadingOption.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueCascadingOption failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueMultipleOption
try {
CustomFieldContextDefaultValueMultipleOption.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleOption failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueSingleOption
try {
CustomFieldContextDefaultValueSingleOption.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleOption failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextSingleUserPickerDefaults
try {
CustomFieldContextSingleUserPickerDefaults.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextSingleUserPickerDefaults failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueMultiUserPicker
try {
CustomFieldContextDefaultValueMultiUserPicker.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultiUserPicker failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueSingleGroupPicker
try {
CustomFieldContextDefaultValueSingleGroupPicker.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleGroupPicker failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueMultipleGroupPicker
try {
CustomFieldContextDefaultValueMultipleGroupPicker.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleGroupPicker failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueDate
try {
CustomFieldContextDefaultValueDate.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueDate failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueDateTime
try {
CustomFieldContextDefaultValueDateTime.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueDateTime failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueURL
try {
CustomFieldContextDefaultValueURL.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueURL failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueProject
try {
CustomFieldContextDefaultValueProject.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueProject failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueFloat
try {
CustomFieldContextDefaultValueFloat.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueFloat failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueLabels
try {
CustomFieldContextDefaultValueLabels.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueLabels failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueTextField
try {
CustomFieldContextDefaultValueTextField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueTextField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueTextArea
try {
CustomFieldContextDefaultValueTextArea.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueTextArea failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueReadOnly
try {
CustomFieldContextDefaultValueReadOnly.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueReadOnly failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueSingleVersionPicker
try {
CustomFieldContextDefaultValueSingleVersionPicker.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueSingleVersionPicker failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueMultipleVersionPicker
try {
CustomFieldContextDefaultValueMultipleVersionPicker.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueMultipleVersionPicker failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeStringField
try {
CustomFieldContextDefaultValueForgeStringField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeStringField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeMultiStringField
try {
CustomFieldContextDefaultValueForgeMultiStringField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiStringField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeObjectField
try {
CustomFieldContextDefaultValueForgeObjectField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeObjectField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeDateTimeField
try {
CustomFieldContextDefaultValueForgeDateTimeField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeDateTimeField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeGroupField
try {
CustomFieldContextDefaultValueForgeGroupField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeGroupField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeMultiGroupField
try {
CustomFieldContextDefaultValueForgeMultiGroupField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiGroupField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeNumberField
try {
CustomFieldContextDefaultValueForgeNumberField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeNumberField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeUserField
try {
CustomFieldContextDefaultValueForgeUserField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeUserField failed with `%s`.", e.getMessage()));
// continue to the next one
}
// validate the json string with CustomFieldContextDefaultValueForgeMultiUserField
try {
CustomFieldContextDefaultValueForgeMultiUserField.validateJsonElement(jsonElement);
validCount++;
} catch (Exception e) {
errorMessages.add(String.format("Deserialization for CustomFieldContextDefaultValueForgeMultiUserField failed with `%s`.", e.getMessage()));
// continue to the next one
}
if (validCount != 1) {
throw new IOException(String.format("The JSON string is invalid for CustomFieldContextDefaultValue with oneOf schemas: CustomFieldContextDefaultValueCascadingOption, CustomFieldContextDefaultValueDate, CustomFieldContextDefaultValueDateTime, CustomFieldContextDefaultValueFloat, CustomFieldContextDefaultValueForgeDateTimeField, CustomFieldContextDefaultValueForgeGroupField, CustomFieldContextDefaultValueForgeMultiGroupField, CustomFieldContextDefaultValueForgeMultiStringField, CustomFieldContextDefaultValueForgeMultiUserField, CustomFieldContextDefaultValueForgeNumberField, CustomFieldContextDefaultValueForgeObjectField, CustomFieldContextDefaultValueForgeStringField, CustomFieldContextDefaultValueForgeUserField, CustomFieldContextDefaultValueLabels, CustomFieldContextDefaultValueMultiUserPicker, CustomFieldContextDefaultValueMultipleGroupPicker, CustomFieldContextDefaultValueMultipleOption, CustomFieldContextDefaultValueMultipleVersionPicker, CustomFieldContextDefaultValueProject, CustomFieldContextDefaultValueReadOnly, CustomFieldContextDefaultValueSingleGroupPicker, CustomFieldContextDefaultValueSingleOption, CustomFieldContextDefaultValueSingleVersionPicker, CustomFieldContextDefaultValueTextArea, CustomFieldContextDefaultValueTextField, CustomFieldContextDefaultValueURL, CustomFieldContextSingleUserPickerDefaults. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString()));
}
}
/**
* Create an instance of CustomFieldContextDefaultValue given an JSON string
*
* @param jsonString JSON string
* @return An instance of CustomFieldContextDefaultValue
* @throws IOException if the JSON string is invalid with respect to CustomFieldContextDefaultValue
*/
public static CustomFieldContextDefaultValue fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, CustomFieldContextDefaultValue.class);
}
/**
* Convert an instance of CustomFieldContextDefaultValue to an JSON string
*
* @return JSON string
*/
public String toJson() {
return JSON.getGson().toJson(this);
}
}