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

com.linkedin.restli.restspec.CollectionSchema Maven / Gradle / Ivy

Go to download

Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.

There is a newer version: 27.7.18
Show newest version

package com.linkedin.restli.restspec;

import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
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.GetMode;
import com.linkedin.data.template.RecordTemplate;
import com.linkedin.data.template.SetMode;
import com.linkedin.data.template.StringArray;


/**
 * 
 * 
 */
@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/restspec/CollectionSchema.pdsc.", date = "Tue Oct 03 15:15:24 PDT 2017")
public class CollectionSchema
    extends RecordTemplate
{

    private final static CollectionSchema.Fields _fields = new CollectionSchema.Fields();
    private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"CollectionSchema\",\"namespace\":\"com.linkedin.restli.restspec\",\"fields\":[{\"name\":\"identifier\",\"type\":{\"type\":\"record\",\"name\":\"IdentifierSchema\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of the identifier\"},{\"name\":\"type\",\"type\":\"string\",\"doc\":\"avro type of the identifier\"},{\"name\":\"params\",\"type\":\"string\",\"doc\":\"avro type of the identifier parameters\",\"optional\":true}]},\"doc\":\"details of the identifier (key) for this collection\"},{\"name\":\"alternativeKeys\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AlternativeKeySchema\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"Name of the alternative key\"},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for the alternative key\",\"optional\":true},{\"name\":\"type\",\"type\":\"string\",\"doc\":\"the avro type of the alternative key\"},{\"name\":\"keyCoercer\",\"type\":\"string\",\"doc\":\"the keyCoercer class for this alternative key\"}]}},\"doc\":\"alternative keys\",\"optional\":true},{\"name\":\"supports\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"basic rest.li methods supported by this resource, e.g., create, get, update, delete, batch_get\"},{\"name\":\"methods\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"RestMethodSchema\",\"include\":[{\"type\":\"record\",\"name\":\"CustomAnnotationSchema\",\"doc\":\"Custom annotation for idl\",\"fields\":[{\"name\":\"annotations\",\"type\":{\"type\":\"map\",\"values\":{\"type\":\"record\",\"name\":\"CustomAnnotationContentSchema\",\"doc\":\"Unstructured record that represents arbitrary custom annotations for idl. Actual content is always a map with annotation's overridable member name as key and member value as value\",\"fields\":[]}},\"doc\":\"custom annotation data\",\"optional\":true}]}],\"fields\":[{\"name\":\"method\",\"type\":\"string\",\"doc\":\"Method type for this rest method\"},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for this rest method\",\"optional\":true},{\"name\":\"parameters\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ParameterSchema\",\"include\":[\"CustomAnnotationSchema\"],\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of this parameter\"},{\"name\":\"type\",\"type\":\"string\",\"doc\":\"avro type of this parameter\"},{\"name\":\"items\",\"type\":\"string\",\"doc\":\"type of individual items, if this is an array parameter (used for finder parameters)\",\"optional\":true},{\"name\":\"optional\",\"type\":\"boolean\",\"doc\":\"indicates whether this parameter is optional.  omitted for required parameters\",\"optional\":true},{\"name\":\"default\",\"type\":\"string\",\"doc\":\"indicates the default value for this parameter\",\"optional\":true},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for this parameter\",\"optional\":true}]}},\"doc\":\"list of query parameters for this method\",\"optional\":true},{\"name\":\"metadata\",\"type\":{\"type\":\"record\",\"name\":\"MetadataSchema\",\"fields\":[{\"name\":\"type\",\"type\":\"string\",\"doc\":\"pegasus type of the metadata\"}]},\"doc\":\"Describes the collection level metadata returned by this method. This is usually set only for GET_ALL method type.\",\"optional\":true},{\"name\":\"pagingSupported\",\"type\":\"boolean\",\"doc\":\"Indicates if this rest method has paging support using the start and count parameters\",\"optional\":true}]}},\"doc\":\"details on rest methods supported by this collection\",\"optional\":true},{\"name\":\"finders\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"FinderSchema\",\"include\":[\"CustomAnnotationSchema\"],\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of this finder - not required if this is the default finder\",\"optional\":true},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for this finder\",\"optional\":true},{\"name\":\"parameters\",\"type\":{\"type\":\"array\",\"items\":\"ParameterSchema\"},\"doc\":\"list of query parameters for this finder\",\"optional\":true},{\"name\":\"metadata\",\"type\":\"MetadataSchema\",\"doc\":\"describes the collection-level metadata returned by this finder\",\"optional\":true},{\"name\":\"assocKey\",\"type\":\"string\",\"doc\":\"association key for this finder - only present if this finder takes a single association key\",\"optional\":true},{\"name\":\"assocKeys\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"list of association keys for this finder - only present if this finder takes multiple association keys\",\"optional\":true},{\"name\":\"pagingSupported\",\"type\":\"boolean\",\"doc\":\"Indicates if this finder method has paging support using the start and count parameters\",\"optional\":true}]}},\"doc\":\"list of finders supported by this collection\",\"optional\":true},{\"name\":\"actions\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ActionSchema\",\"include\":[\"CustomAnnotationSchema\"],\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of this action\"},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for this action\",\"optional\":true},{\"name\":\"parameters\",\"type\":{\"type\":\"array\",\"items\":\"ParameterSchema\"},\"doc\":\"parameters for this action\",\"optional\":true},{\"name\":\"returns\",\"type\":\"string\",\"doc\":\"avro type of this action's return value\",\"optional\":true},{\"name\":\"throws\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"list of exception types thrown by this action\",\"optional\":true}]}},\"doc\":\"list of actions supported by this collection\",\"optional\":true},{\"name\":\"entity\",\"type\":{\"type\":\"record\",\"name\":\"EntitySchema\",\"fields\":[{\"name\":\"path\",\"type\":\"string\",\"doc\":\"URI template for accessing this entity\"},{\"name\":\"actions\",\"type\":{\"type\":\"array\",\"items\":\"ActionSchema\"},\"doc\":\"list of actions supported by this entity\",\"optional\":true},{\"name\":\"subresources\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"ResourceSchema\",\"include\":[\"CustomAnnotationSchema\"],\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of the resource\"},{\"name\":\"namespace\",\"type\":\"string\",\"doc\":\"namespace of the resource\",\"optional\":true},{\"name\":\"path\",\"type\":\"string\",\"doc\":\"URI template for accessing the resource\"},{\"name\":\"schema\",\"type\":\"string\",\"doc\":\"Java-style fully-qualified class name for record entities of this resource. This is only present when the entity type is STRUCTURED_DATA\",\"optional\":true},{\"name\":\"entityType\",\"type\":{\"type\":\"enum\",\"name\":\"ResourceEntityType\",\"symbols\":[\"STRUCTURED_DATA\",\"UNSTRUCTURED_DATA\"],\"symbolDocs\":{\"STRUCTURED_DATA\":\"This resource produces structured data that is defined by schema\",\"UNSTRUCTURED_DATA\":\"This resource produces unstructured data that has no schema\"}},\"doc\":\"The type of entity this resource produces. This is not the record schema type, which is specified in the 'schema' field\",\"default\":\"STRUCTURED_DATA\"},{\"name\":\"doc\",\"type\":\"string\",\"doc\":\"Documentation for this resource\",\"optional\":true},{\"name\":\"collection\",\"type\":\"CollectionSchema\",\"doc\":\"details of collection, if this resource is a collection\",\"optional\":true},{\"name\":\"association\",\"type\":{\"type\":\"record\",\"name\":\"AssociationSchema\",\"fields\":[{\"name\":\"identifier\",\"type\":\"string\",\"doc\":\"name of the identifier (key) for this collection\",\"optional\":true},{\"name\":\"assocKeys\",\"type\":{\"type\":\"array\",\"items\":{\"type\":\"record\",\"name\":\"AssocKeySchema\",\"fields\":[{\"name\":\"name\",\"type\":\"string\",\"doc\":\"name of association key\"},{\"name\":\"type\",\"type\":\"string\",\"doc\":\"avro type of association key\"}]}},\"doc\":\"list of association keys for this association\"},{\"name\":\"alternativeKeys\",\"type\":{\"type\":\"array\",\"items\":\"AlternativeKeySchema\"},\"doc\":\"alternative keys\",\"optional\":true},{\"name\":\"supports\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"list of rest.li methods supported by this association, e.g., get, update, delete, batch_get\"},{\"name\":\"methods\",\"type\":{\"type\":\"array\",\"items\":\"RestMethodSchema\"},\"doc\":\"details on rest methods supported by this association\",\"optional\":true},{\"name\":\"finders\",\"type\":{\"type\":\"array\",\"items\":\"FinderSchema\"},\"doc\":\"list of finders supported by this association\",\"optional\":true},{\"name\":\"actions\",\"type\":{\"type\":\"array\",\"items\":\"ActionSchema\"},\"doc\":\"list of actions supported by this association\",\"optional\":true},{\"name\":\"entity\",\"type\":\"EntitySchema\",\"doc\":\"details on the entities contained in this association\"}]},\"doc\":\"details of association, if this resource is an association\",\"optional\":true},{\"name\":\"actionsSet\",\"type\":{\"type\":\"record\",\"name\":\"ActionsSetSchema\",\"fields\":[{\"name\":\"actions\",\"type\":{\"type\":\"array\",\"items\":\"ActionSchema\"},\"doc\":\"list of actions supported by this action set\"}]},\"doc\":\"details of action set, if this resource is an action set\",\"optional\":true},{\"name\":\"simple\",\"type\":{\"type\":\"record\",\"name\":\"SimpleSchema\",\"fields\":[{\"name\":\"supports\",\"type\":{\"type\":\"array\",\"items\":\"string\"},\"doc\":\"basic rest.li methods supported by this resource, e.g. get, update, delete\"},{\"name\":\"methods\",\"type\":{\"type\":\"array\",\"items\":\"RestMethodSchema\"},\"doc\":\"details on rest methods supported by this simple resource\",\"optional\":true},{\"name\":\"actions\",\"type\":{\"type\":\"array\",\"items\":\"ActionSchema\"},\"doc\":\"list of actions supported by this simple resource\",\"optional\":true},{\"name\":\"entity\",\"type\":\"EntitySchema\",\"doc\":\"details of the entity provided by this simple resource\"}]},\"doc\":\"details of simple resource, if this resource is a simple resource\",\"optional\":true}]}},\"doc\":\"list of subresources accessible via this entity\",\"optional\":true}]},\"doc\":\"details of the entity provided by this collection\"}]}"));
    private final static RecordDataSchema.Field FIELD_Identifier = SCHEMA.getField("identifier");
    private final static RecordDataSchema.Field FIELD_AlternativeKeys = SCHEMA.getField("alternativeKeys");
    private final static RecordDataSchema.Field FIELD_Supports = SCHEMA.getField("supports");
    private final static RecordDataSchema.Field FIELD_Methods = SCHEMA.getField("methods");
    private final static RecordDataSchema.Field FIELD_Finders = SCHEMA.getField("finders");
    private final static RecordDataSchema.Field FIELD_Actions = SCHEMA.getField("actions");
    private final static RecordDataSchema.Field FIELD_Entity = SCHEMA.getField("entity");

    public CollectionSchema() {
        super(new DataMap(), SCHEMA);
    }

    public CollectionSchema(DataMap data) {
        super(data, SCHEMA);
    }

    public static CollectionSchema.Fields fields() {
        return _fields;
    }

    /**
     * Existence checker for identifier
     * 
     * @see CollectionSchema.Fields#identifier
     */
    public boolean hasIdentifier() {
        return contains(FIELD_Identifier);
    }

    /**
     * Remover for identifier
     * 
     * @see CollectionSchema.Fields#identifier
     */
    public void removeIdentifier() {
        remove(FIELD_Identifier);
    }

    /**
     * Getter for identifier
     * 
     * @see CollectionSchema.Fields#identifier
     */
    public IdentifierSchema getIdentifier(GetMode mode) {
        return obtainWrapped(FIELD_Identifier, IdentifierSchema.class, mode);
    }

    /**
     * Getter for identifier
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see CollectionSchema.Fields#identifier
     */
    @Nonnull
    public IdentifierSchema getIdentifier() {
        return obtainWrapped(FIELD_Identifier, IdentifierSchema.class, GetMode.STRICT);
    }

    /**
     * Setter for identifier
     * 
     * @see CollectionSchema.Fields#identifier
     */
    public CollectionSchema setIdentifier(IdentifierSchema value, SetMode mode) {
        putWrapped(FIELD_Identifier, IdentifierSchema.class, value, mode);
        return this;
    }

    /**
     * Setter for identifier
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#identifier
     */
    public CollectionSchema setIdentifier(
        @Nonnull
        IdentifierSchema value) {
        putWrapped(FIELD_Identifier, IdentifierSchema.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for alternativeKeys
     * 
     * @see CollectionSchema.Fields#alternativeKeys
     */
    public boolean hasAlternativeKeys() {
        return contains(FIELD_AlternativeKeys);
    }

    /**
     * Remover for alternativeKeys
     * 
     * @see CollectionSchema.Fields#alternativeKeys
     */
    public void removeAlternativeKeys() {
        remove(FIELD_AlternativeKeys);
    }

    /**
     * Getter for alternativeKeys
     * 
     * @see CollectionSchema.Fields#alternativeKeys
     */
    public AlternativeKeySchemaArray getAlternativeKeys(GetMode mode) {
        return obtainWrapped(FIELD_AlternativeKeys, AlternativeKeySchemaArray.class, mode);
    }

    /**
     * Getter for alternativeKeys
     * 
     * @return
     *     Optional field. Always check for null.
     * @see CollectionSchema.Fields#alternativeKeys
     */
    @Nullable
    public AlternativeKeySchemaArray getAlternativeKeys() {
        return obtainWrapped(FIELD_AlternativeKeys, AlternativeKeySchemaArray.class, GetMode.STRICT);
    }

    /**
     * Setter for alternativeKeys
     * 
     * @see CollectionSchema.Fields#alternativeKeys
     */
    public CollectionSchema setAlternativeKeys(AlternativeKeySchemaArray value, SetMode mode) {
        putWrapped(FIELD_AlternativeKeys, AlternativeKeySchemaArray.class, value, mode);
        return this;
    }

    /**
     * Setter for alternativeKeys
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#alternativeKeys
     */
    public CollectionSchema setAlternativeKeys(
        @Nonnull
        AlternativeKeySchemaArray value) {
        putWrapped(FIELD_AlternativeKeys, AlternativeKeySchemaArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for supports
     * 
     * @see CollectionSchema.Fields#supports
     */
    public boolean hasSupports() {
        return contains(FIELD_Supports);
    }

    /**
     * Remover for supports
     * 
     * @see CollectionSchema.Fields#supports
     */
    public void removeSupports() {
        remove(FIELD_Supports);
    }

    /**
     * Getter for supports
     * 
     * @see CollectionSchema.Fields#supports
     */
    public StringArray getSupports(GetMode mode) {
        return obtainWrapped(FIELD_Supports, StringArray.class, mode);
    }

    /**
     * Getter for supports
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see CollectionSchema.Fields#supports
     */
    @Nonnull
    public StringArray getSupports() {
        return obtainWrapped(FIELD_Supports, StringArray.class, GetMode.STRICT);
    }

    /**
     * Setter for supports
     * 
     * @see CollectionSchema.Fields#supports
     */
    public CollectionSchema setSupports(StringArray value, SetMode mode) {
        putWrapped(FIELD_Supports, StringArray.class, value, mode);
        return this;
    }

    /**
     * Setter for supports
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#supports
     */
    public CollectionSchema setSupports(
        @Nonnull
        StringArray value) {
        putWrapped(FIELD_Supports, StringArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for methods
     * 
     * @see CollectionSchema.Fields#methods
     */
    public boolean hasMethods() {
        return contains(FIELD_Methods);
    }

    /**
     * Remover for methods
     * 
     * @see CollectionSchema.Fields#methods
     */
    public void removeMethods() {
        remove(FIELD_Methods);
    }

    /**
     * Getter for methods
     * 
     * @see CollectionSchema.Fields#methods
     */
    public RestMethodSchemaArray getMethods(GetMode mode) {
        return obtainWrapped(FIELD_Methods, RestMethodSchemaArray.class, mode);
    }

    /**
     * Getter for methods
     * 
     * @return
     *     Optional field. Always check for null.
     * @see CollectionSchema.Fields#methods
     */
    @Nullable
    public RestMethodSchemaArray getMethods() {
        return obtainWrapped(FIELD_Methods, RestMethodSchemaArray.class, GetMode.STRICT);
    }

    /**
     * Setter for methods
     * 
     * @see CollectionSchema.Fields#methods
     */
    public CollectionSchema setMethods(RestMethodSchemaArray value, SetMode mode) {
        putWrapped(FIELD_Methods, RestMethodSchemaArray.class, value, mode);
        return this;
    }

    /**
     * Setter for methods
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#methods
     */
    public CollectionSchema setMethods(
        @Nonnull
        RestMethodSchemaArray value) {
        putWrapped(FIELD_Methods, RestMethodSchemaArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for finders
     * 
     * @see CollectionSchema.Fields#finders
     */
    public boolean hasFinders() {
        return contains(FIELD_Finders);
    }

    /**
     * Remover for finders
     * 
     * @see CollectionSchema.Fields#finders
     */
    public void removeFinders() {
        remove(FIELD_Finders);
    }

    /**
     * Getter for finders
     * 
     * @see CollectionSchema.Fields#finders
     */
    public FinderSchemaArray getFinders(GetMode mode) {
        return obtainWrapped(FIELD_Finders, FinderSchemaArray.class, mode);
    }

    /**
     * Getter for finders
     * 
     * @return
     *     Optional field. Always check for null.
     * @see CollectionSchema.Fields#finders
     */
    @Nullable
    public FinderSchemaArray getFinders() {
        return obtainWrapped(FIELD_Finders, FinderSchemaArray.class, GetMode.STRICT);
    }

    /**
     * Setter for finders
     * 
     * @see CollectionSchema.Fields#finders
     */
    public CollectionSchema setFinders(FinderSchemaArray value, SetMode mode) {
        putWrapped(FIELD_Finders, FinderSchemaArray.class, value, mode);
        return this;
    }

    /**
     * Setter for finders
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#finders
     */
    public CollectionSchema setFinders(
        @Nonnull
        FinderSchemaArray value) {
        putWrapped(FIELD_Finders, FinderSchemaArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for actions
     * 
     * @see CollectionSchema.Fields#actions
     */
    public boolean hasActions() {
        return contains(FIELD_Actions);
    }

    /**
     * Remover for actions
     * 
     * @see CollectionSchema.Fields#actions
     */
    public void removeActions() {
        remove(FIELD_Actions);
    }

    /**
     * Getter for actions
     * 
     * @see CollectionSchema.Fields#actions
     */
    public ActionSchemaArray getActions(GetMode mode) {
        return obtainWrapped(FIELD_Actions, ActionSchemaArray.class, mode);
    }

    /**
     * Getter for actions
     * 
     * @return
     *     Optional field. Always check for null.
     * @see CollectionSchema.Fields#actions
     */
    @Nullable
    public ActionSchemaArray getActions() {
        return obtainWrapped(FIELD_Actions, ActionSchemaArray.class, GetMode.STRICT);
    }

    /**
     * Setter for actions
     * 
     * @see CollectionSchema.Fields#actions
     */
    public CollectionSchema setActions(ActionSchemaArray value, SetMode mode) {
        putWrapped(FIELD_Actions, ActionSchemaArray.class, value, mode);
        return this;
    }

    /**
     * Setter for actions
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#actions
     */
    public CollectionSchema setActions(
        @Nonnull
        ActionSchemaArray value) {
        putWrapped(FIELD_Actions, ActionSchemaArray.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for entity
     * 
     * @see CollectionSchema.Fields#entity
     */
    public boolean hasEntity() {
        return contains(FIELD_Entity);
    }

    /**
     * Remover for entity
     * 
     * @see CollectionSchema.Fields#entity
     */
    public void removeEntity() {
        remove(FIELD_Entity);
    }

    /**
     * Getter for entity
     * 
     * @see CollectionSchema.Fields#entity
     */
    public EntitySchema getEntity(GetMode mode) {
        return obtainWrapped(FIELD_Entity, EntitySchema.class, mode);
    }

    /**
     * Getter for entity
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see CollectionSchema.Fields#entity
     */
    @Nonnull
    public EntitySchema getEntity() {
        return obtainWrapped(FIELD_Entity, EntitySchema.class, GetMode.STRICT);
    }

    /**
     * Setter for entity
     * 
     * @see CollectionSchema.Fields#entity
     */
    public CollectionSchema setEntity(EntitySchema value, SetMode mode) {
        putWrapped(FIELD_Entity, EntitySchema.class, value, mode);
        return this;
    }

    /**
     * Setter for entity
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see CollectionSchema.Fields#entity
     */
    public CollectionSchema setEntity(
        @Nonnull
        EntitySchema value) {
        putWrapped(FIELD_Entity, EntitySchema.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    @Override
    public CollectionSchema clone()
        throws CloneNotSupportedException
    {
        return ((CollectionSchema) super.clone());
    }

    @Override
    public CollectionSchema copy()
        throws CloneNotSupportedException
    {
        return ((CollectionSchema) super.copy());
    }

    public static class Fields
        extends PathSpec
    {


        public Fields(List path, String name) {
            super(path, name);
        }

        public Fields() {
            super();
        }

        /**
         * details of the identifier (key) for this collection
         * 
         */
        public com.linkedin.restli.restspec.IdentifierSchema.Fields identifier() {
            return new com.linkedin.restli.restspec.IdentifierSchema.Fields(getPathComponents(), "identifier");
        }

        /**
         * alternative keys
         * 
         */
        public com.linkedin.restli.restspec.AlternativeKeySchemaArray.Fields alternativeKeys() {
            return new com.linkedin.restli.restspec.AlternativeKeySchemaArray.Fields(getPathComponents(), "alternativeKeys");
        }

        /**
         * basic rest.li methods supported by this resource, e.g., create, get, update, delete, batch_get
         * 
         */
        public PathSpec supports() {
            return new PathSpec(getPathComponents(), "supports");
        }

        /**
         * details on rest methods supported by this collection
         * 
         */
        public com.linkedin.restli.restspec.RestMethodSchemaArray.Fields methods() {
            return new com.linkedin.restli.restspec.RestMethodSchemaArray.Fields(getPathComponents(), "methods");
        }

        /**
         * list of finders supported by this collection
         * 
         */
        public com.linkedin.restli.restspec.FinderSchemaArray.Fields finders() {
            return new com.linkedin.restli.restspec.FinderSchemaArray.Fields(getPathComponents(), "finders");
        }

        /**
         * list of actions supported by this collection
         * 
         */
        public com.linkedin.restli.restspec.ActionSchemaArray.Fields actions() {
            return new com.linkedin.restli.restspec.ActionSchemaArray.Fields(getPathComponents(), "actions");
        }

        /**
         * details of the entity provided by this collection
         * 
         */
        public com.linkedin.restli.restspec.EntitySchema.Fields entity() {
            return new com.linkedin.restli.restspec.EntitySchema.Fields(getPathComponents(), "entity");
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy