com.linkedin.restli.common.EmptyRecord Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of restli-common Show documentation
Show all versions of restli-common Show documentation
Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.
package com.linkedin.restli.common;
import java.util.List;
import javax.annotation.Generated;
import com.linkedin.data.DataMap;
import com.linkedin.data.schema.PathSpec;
import com.linkedin.data.schema.RecordDataSchema;
import com.linkedin.data.template.DataTemplateUtil;
import com.linkedin.data.template.RecordTemplate;
/**
* An literally empty record. Intended as a marker to indicate the absence of content where a record type is required. If used the underlying DataMap *must* be empty, EmptyRecordValidator is provided to help enforce this. For example, CreateRequest extends Request to indicate it has no response body. Also, a ComplexKeyResource implementation that has no ParamKey should have a signature like XyzResource implements ComplexKeyResource.
*
*/
@Generated(value = "com.linkedin.pegasus.generator.JavaCodeUtil", comments = "Rest.li Data Template. Generated from /Users/mnchen/dev/pegasus_trunk/pegasus/restli-common/src/main/pegasus/com/linkedin/restli/common/EmptyRecord.pdsc.", date = "Tue Oct 03 15:15:24 PDT 2017")
public class EmptyRecord
extends RecordTemplate
{
private final static EmptyRecord.Fields _fields = new EmptyRecord.Fields();
private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"EmptyRecord\",\"namespace\":\"com.linkedin.restli.common\",\"doc\":\"An literally empty record. Intended as a marker to indicate the absence of content where a record type is required. If used the underlying DataMap *must* be empty, EmptyRecordValidator is provided to help enforce this. For example, CreateRequest extends Request to indicate it has no response body. Also, a ComplexKeyResource implementation that has no ParamKey should have a signature like XyzResource implements ComplexKeyResource.\",\"fields\":[],\"validate\":{\"com.linkedin.restli.common.EmptyRecordValidator\":{}}}"));
public EmptyRecord() {
super(new DataMap(), SCHEMA);
}
public EmptyRecord(DataMap data) {
super(data, SCHEMA);
}
public static EmptyRecord.Fields fields() {
return _fields;
}
@Override
public EmptyRecord clone()
throws CloneNotSupportedException
{
return ((EmptyRecord) super.clone());
}
@Override
public EmptyRecord copy()
throws CloneNotSupportedException
{
return ((EmptyRecord) super.copy());
}
public static class Fields
extends PathSpec
{
public Fields(List path, String name) {
super(path, name);
}
public Fields() {
super();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy