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

com.linkedin.restli.restspec.ResourceSchema 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;


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

    private final static ResourceSchema.Fields _fields = new ResourceSchema.Fields();
    private final static RecordDataSchema SCHEMA = ((RecordDataSchema) DataTemplateUtil.parseSchema("{\"type\":\"record\",\"name\":\"ResourceSchema\",\"namespace\":\"com.linkedin.restli.restspec\",\"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\":\"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\":{\"type\":\"record\",\"name\":\"CollectionSchema\",\"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\":[\"CustomAnnotationSchema\"],\"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\":\"ResourceSchema\"},\"doc\":\"list of subresources accessible via this entity\",\"optional\":true}]},\"doc\":\"details of the entity provided by this collection\"}]},\"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}]}"));
    private final static RecordDataSchema.Field FIELD_Annotations = SCHEMA.getField("annotations");
    private final static RecordDataSchema.Field FIELD_Name = SCHEMA.getField("name");
    private final static RecordDataSchema.Field FIELD_Namespace = SCHEMA.getField("namespace");
    private final static RecordDataSchema.Field FIELD_Path = SCHEMA.getField("path");
    private final static RecordDataSchema.Field FIELD_Schema = SCHEMA.getField("schema");
    private final static RecordDataSchema.Field FIELD_EntityType = SCHEMA.getField("entityType");
    private final static RecordDataSchema.Field FIELD_Doc = SCHEMA.getField("doc");
    private final static RecordDataSchema.Field FIELD_Collection = SCHEMA.getField("collection");
    private final static RecordDataSchema.Field FIELD_Association = SCHEMA.getField("association");
    private final static RecordDataSchema.Field FIELD_ActionsSet = SCHEMA.getField("actionsSet");
    private final static RecordDataSchema.Field FIELD_Simple = SCHEMA.getField("simple");

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

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

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

    /**
     * Existence checker for annotations
     * 
     * @see ResourceSchema.Fields#annotations
     */
    public boolean hasAnnotations() {
        return contains(FIELD_Annotations);
    }

    /**
     * Remover for annotations
     * 
     * @see ResourceSchema.Fields#annotations
     */
    public void removeAnnotations() {
        remove(FIELD_Annotations);
    }

    /**
     * Getter for annotations
     * 
     * @see ResourceSchema.Fields#annotations
     */
    public CustomAnnotationContentSchemaMap getAnnotations(GetMode mode) {
        return obtainWrapped(FIELD_Annotations, CustomAnnotationContentSchemaMap.class, mode);
    }

    /**
     * Getter for annotations
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#annotations
     */
    @Nullable
    public CustomAnnotationContentSchemaMap getAnnotations() {
        return obtainWrapped(FIELD_Annotations, CustomAnnotationContentSchemaMap.class, GetMode.STRICT);
    }

    /**
     * Setter for annotations
     * 
     * @see ResourceSchema.Fields#annotations
     */
    public ResourceSchema setAnnotations(CustomAnnotationContentSchemaMap value, SetMode mode) {
        putWrapped(FIELD_Annotations, CustomAnnotationContentSchemaMap.class, value, mode);
        return this;
    }

    /**
     * Setter for annotations
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#annotations
     */
    public ResourceSchema setAnnotations(
        @Nonnull
        CustomAnnotationContentSchemaMap value) {
        putWrapped(FIELD_Annotations, CustomAnnotationContentSchemaMap.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for name
     * 
     * @see ResourceSchema.Fields#name
     */
    public boolean hasName() {
        return contains(FIELD_Name);
    }

    /**
     * Remover for name
     * 
     * @see ResourceSchema.Fields#name
     */
    public void removeName() {
        remove(FIELD_Name);
    }

    /**
     * Getter for name
     * 
     * @see ResourceSchema.Fields#name
     */
    public String getName(GetMode mode) {
        return obtainDirect(FIELD_Name, String.class, mode);
    }

    /**
     * Getter for name
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see ResourceSchema.Fields#name
     */
    @Nonnull
    public String getName() {
        return obtainDirect(FIELD_Name, String.class, GetMode.STRICT);
    }

    /**
     * Setter for name
     * 
     * @see ResourceSchema.Fields#name
     */
    public ResourceSchema setName(String value, SetMode mode) {
        putDirect(FIELD_Name, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for name
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#name
     */
    public ResourceSchema setName(
        @Nonnull
        String value) {
        putDirect(FIELD_Name, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for namespace
     * 
     * @see ResourceSchema.Fields#namespace
     */
    public boolean hasNamespace() {
        return contains(FIELD_Namespace);
    }

    /**
     * Remover for namespace
     * 
     * @see ResourceSchema.Fields#namespace
     */
    public void removeNamespace() {
        remove(FIELD_Namespace);
    }

    /**
     * Getter for namespace
     * 
     * @see ResourceSchema.Fields#namespace
     */
    public String getNamespace(GetMode mode) {
        return obtainDirect(FIELD_Namespace, String.class, mode);
    }

    /**
     * Getter for namespace
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#namespace
     */
    @Nullable
    public String getNamespace() {
        return obtainDirect(FIELD_Namespace, String.class, GetMode.STRICT);
    }

    /**
     * Setter for namespace
     * 
     * @see ResourceSchema.Fields#namespace
     */
    public ResourceSchema setNamespace(String value, SetMode mode) {
        putDirect(FIELD_Namespace, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for namespace
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#namespace
     */
    public ResourceSchema setNamespace(
        @Nonnull
        String value) {
        putDirect(FIELD_Namespace, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for path
     * 
     * @see ResourceSchema.Fields#path
     */
    public boolean hasPath() {
        return contains(FIELD_Path);
    }

    /**
     * Remover for path
     * 
     * @see ResourceSchema.Fields#path
     */
    public void removePath() {
        remove(FIELD_Path);
    }

    /**
     * Getter for path
     * 
     * @see ResourceSchema.Fields#path
     */
    public String getPath(GetMode mode) {
        return obtainDirect(FIELD_Path, String.class, mode);
    }

    /**
     * Getter for path
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see ResourceSchema.Fields#path
     */
    @Nonnull
    public String getPath() {
        return obtainDirect(FIELD_Path, String.class, GetMode.STRICT);
    }

    /**
     * Setter for path
     * 
     * @see ResourceSchema.Fields#path
     */
    public ResourceSchema setPath(String value, SetMode mode) {
        putDirect(FIELD_Path, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for path
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#path
     */
    public ResourceSchema setPath(
        @Nonnull
        String value) {
        putDirect(FIELD_Path, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for schema
     * 
     * @see ResourceSchema.Fields#schema
     */
    public boolean hasSchema() {
        return contains(FIELD_Schema);
    }

    /**
     * Remover for schema
     * 
     * @see ResourceSchema.Fields#schema
     */
    public void removeSchema() {
        remove(FIELD_Schema);
    }

    /**
     * Getter for schema
     * 
     * @see ResourceSchema.Fields#schema
     */
    public String getSchema(GetMode mode) {
        return obtainDirect(FIELD_Schema, String.class, mode);
    }

    /**
     * Getter for schema
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#schema
     */
    @Nullable
    public String getSchema() {
        return obtainDirect(FIELD_Schema, String.class, GetMode.STRICT);
    }

    /**
     * Setter for schema
     * 
     * @see ResourceSchema.Fields#schema
     */
    public ResourceSchema setSchema(String value, SetMode mode) {
        putDirect(FIELD_Schema, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for schema
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#schema
     */
    public ResourceSchema setSchema(
        @Nonnull
        String value) {
        putDirect(FIELD_Schema, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for entityType
     * 
     * @see ResourceSchema.Fields#entityType
     */
    public boolean hasEntityType() {
        return contains(FIELD_EntityType);
    }

    /**
     * Remover for entityType
     * 
     * @see ResourceSchema.Fields#entityType
     */
    public void removeEntityType() {
        remove(FIELD_EntityType);
    }

    /**
     * Getter for entityType
     * 
     * @see ResourceSchema.Fields#entityType
     */
    public ResourceEntityType getEntityType(GetMode mode) {
        return obtainDirect(FIELD_EntityType, ResourceEntityType.class, mode);
    }

    /**
     * Getter for entityType
     * 
     * @return
     *     Required field. Could be null for partial record.
     * @see ResourceSchema.Fields#entityType
     */
    @Nonnull
    public ResourceEntityType getEntityType() {
        return obtainDirect(FIELD_EntityType, ResourceEntityType.class, GetMode.STRICT);
    }

    /**
     * Setter for entityType
     * 
     * @see ResourceSchema.Fields#entityType
     */
    public ResourceSchema setEntityType(ResourceEntityType value, SetMode mode) {
        putDirect(FIELD_EntityType, ResourceEntityType.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for entityType
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#entityType
     */
    public ResourceSchema setEntityType(
        @Nonnull
        ResourceEntityType value) {
        putDirect(FIELD_EntityType, ResourceEntityType.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for doc
     * 
     * @see ResourceSchema.Fields#doc
     */
    public boolean hasDoc() {
        return contains(FIELD_Doc);
    }

    /**
     * Remover for doc
     * 
     * @see ResourceSchema.Fields#doc
     */
    public void removeDoc() {
        remove(FIELD_Doc);
    }

    /**
     * Getter for doc
     * 
     * @see ResourceSchema.Fields#doc
     */
    public String getDoc(GetMode mode) {
        return obtainDirect(FIELD_Doc, String.class, mode);
    }

    /**
     * Getter for doc
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#doc
     */
    @Nullable
    public String getDoc() {
        return obtainDirect(FIELD_Doc, String.class, GetMode.STRICT);
    }

    /**
     * Setter for doc
     * 
     * @see ResourceSchema.Fields#doc
     */
    public ResourceSchema setDoc(String value, SetMode mode) {
        putDirect(FIELD_Doc, String.class, String.class, value, mode);
        return this;
    }

    /**
     * Setter for doc
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#doc
     */
    public ResourceSchema setDoc(
        @Nonnull
        String value) {
        putDirect(FIELD_Doc, String.class, String.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for collection
     * 
     * @see ResourceSchema.Fields#collection
     */
    public boolean hasCollection() {
        return contains(FIELD_Collection);
    }

    /**
     * Remover for collection
     * 
     * @see ResourceSchema.Fields#collection
     */
    public void removeCollection() {
        remove(FIELD_Collection);
    }

    /**
     * Getter for collection
     * 
     * @see ResourceSchema.Fields#collection
     */
    public CollectionSchema getCollection(GetMode mode) {
        return obtainWrapped(FIELD_Collection, CollectionSchema.class, mode);
    }

    /**
     * Getter for collection
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#collection
     */
    @Nullable
    public CollectionSchema getCollection() {
        return obtainWrapped(FIELD_Collection, CollectionSchema.class, GetMode.STRICT);
    }

    /**
     * Setter for collection
     * 
     * @see ResourceSchema.Fields#collection
     */
    public ResourceSchema setCollection(CollectionSchema value, SetMode mode) {
        putWrapped(FIELD_Collection, CollectionSchema.class, value, mode);
        return this;
    }

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

    /**
     * Existence checker for association
     * 
     * @see ResourceSchema.Fields#association
     */
    public boolean hasAssociation() {
        return contains(FIELD_Association);
    }

    /**
     * Remover for association
     * 
     * @see ResourceSchema.Fields#association
     */
    public void removeAssociation() {
        remove(FIELD_Association);
    }

    /**
     * Getter for association
     * 
     * @see ResourceSchema.Fields#association
     */
    public AssociationSchema getAssociation(GetMode mode) {
        return obtainWrapped(FIELD_Association, AssociationSchema.class, mode);
    }

    /**
     * Getter for association
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#association
     */
    @Nullable
    public AssociationSchema getAssociation() {
        return obtainWrapped(FIELD_Association, AssociationSchema.class, GetMode.STRICT);
    }

    /**
     * Setter for association
     * 
     * @see ResourceSchema.Fields#association
     */
    public ResourceSchema setAssociation(AssociationSchema value, SetMode mode) {
        putWrapped(FIELD_Association, AssociationSchema.class, value, mode);
        return this;
    }

    /**
     * Setter for association
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#association
     */
    public ResourceSchema setAssociation(
        @Nonnull
        AssociationSchema value) {
        putWrapped(FIELD_Association, AssociationSchema.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for actionsSet
     * 
     * @see ResourceSchema.Fields#actionsSet
     */
    public boolean hasActionsSet() {
        return contains(FIELD_ActionsSet);
    }

    /**
     * Remover for actionsSet
     * 
     * @see ResourceSchema.Fields#actionsSet
     */
    public void removeActionsSet() {
        remove(FIELD_ActionsSet);
    }

    /**
     * Getter for actionsSet
     * 
     * @see ResourceSchema.Fields#actionsSet
     */
    public ActionsSetSchema getActionsSet(GetMode mode) {
        return obtainWrapped(FIELD_ActionsSet, ActionsSetSchema.class, mode);
    }

    /**
     * Getter for actionsSet
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#actionsSet
     */
    @Nullable
    public ActionsSetSchema getActionsSet() {
        return obtainWrapped(FIELD_ActionsSet, ActionsSetSchema.class, GetMode.STRICT);
    }

    /**
     * Setter for actionsSet
     * 
     * @see ResourceSchema.Fields#actionsSet
     */
    public ResourceSchema setActionsSet(ActionsSetSchema value, SetMode mode) {
        putWrapped(FIELD_ActionsSet, ActionsSetSchema.class, value, mode);
        return this;
    }

    /**
     * Setter for actionsSet
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#actionsSet
     */
    public ResourceSchema setActionsSet(
        @Nonnull
        ActionsSetSchema value) {
        putWrapped(FIELD_ActionsSet, ActionsSetSchema.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

    /**
     * Existence checker for simple
     * 
     * @see ResourceSchema.Fields#simple
     */
    public boolean hasSimple() {
        return contains(FIELD_Simple);
    }

    /**
     * Remover for simple
     * 
     * @see ResourceSchema.Fields#simple
     */
    public void removeSimple() {
        remove(FIELD_Simple);
    }

    /**
     * Getter for simple
     * 
     * @see ResourceSchema.Fields#simple
     */
    public SimpleSchema getSimple(GetMode mode) {
        return obtainWrapped(FIELD_Simple, SimpleSchema.class, mode);
    }

    /**
     * Getter for simple
     * 
     * @return
     *     Optional field. Always check for null.
     * @see ResourceSchema.Fields#simple
     */
    @Nullable
    public SimpleSchema getSimple() {
        return obtainWrapped(FIELD_Simple, SimpleSchema.class, GetMode.STRICT);
    }

    /**
     * Setter for simple
     * 
     * @see ResourceSchema.Fields#simple
     */
    public ResourceSchema setSimple(SimpleSchema value, SetMode mode) {
        putWrapped(FIELD_Simple, SimpleSchema.class, value, mode);
        return this;
    }

    /**
     * Setter for simple
     * 
     * @param value
     *     Must not be null. For more control, use setters with mode instead.
     * @see ResourceSchema.Fields#simple
     */
    public ResourceSchema setSimple(
        @Nonnull
        SimpleSchema value) {
        putWrapped(FIELD_Simple, SimpleSchema.class, value, SetMode.DISALLOW_NULL);
        return this;
    }

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

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

    public static class Fields
        extends PathSpec
    {


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

        public Fields() {
            super();
        }

        /**
         * custom annotation data
         * 
         */
        public com.linkedin.restli.restspec.CustomAnnotationContentSchemaMap.Fields annotations() {
            return new com.linkedin.restli.restspec.CustomAnnotationContentSchemaMap.Fields(getPathComponents(), "annotations");
        }

        /**
         * name of the resource
         * 
         */
        public PathSpec name() {
            return new PathSpec(getPathComponents(), "name");
        }

        /**
         * namespace of the resource
         * 
         */
        public PathSpec namespace() {
            return new PathSpec(getPathComponents(), "namespace");
        }

        /**
         * URI template for accessing the resource
         * 
         */
        public PathSpec path() {
            return new PathSpec(getPathComponents(), "path");
        }

        /**
         * Java-style fully-qualified class name for record entities of this resource. This is only present when the entity type is STRUCTURED_DATA
         * 
         */
        public PathSpec schema() {
            return new PathSpec(getPathComponents(), "schema");
        }

        /**
         * The type of entity this resource produces. This is not the record schema type, which is specified in the 'schema' field
         * 
         */
        public PathSpec entityType() {
            return new PathSpec(getPathComponents(), "entityType");
        }

        /**
         * Documentation for this resource
         * 
         */
        public PathSpec doc() {
            return new PathSpec(getPathComponents(), "doc");
        }

        /**
         * details of collection, if this resource is a collection
         * 
         */
        public com.linkedin.restli.restspec.CollectionSchema.Fields collection() {
            return new com.linkedin.restli.restspec.CollectionSchema.Fields(getPathComponents(), "collection");
        }

        /**
         * details of association, if this resource is an association
         * 
         */
        public com.linkedin.restli.restspec.AssociationSchema.Fields association() {
            return new com.linkedin.restli.restspec.AssociationSchema.Fields(getPathComponents(), "association");
        }

        /**
         * details of action set, if this resource is an action set
         * 
         */
        public com.linkedin.restli.restspec.ActionsSetSchema.Fields actionsSet() {
            return new com.linkedin.restli.restspec.ActionsSetSchema.Fields(getPathComponents(), "actionsSet");
        }

        /**
         * details of simple resource, if this resource is a simple resource
         * 
         */
        public com.linkedin.restli.restspec.SimpleSchema.Fields simple() {
            return new com.linkedin.restli.restspec.SimpleSchema.Fields(getPathComponents(), "simple");
        }

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy