<commit_before>package org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10;


import org.openmrs.Program;
import org.openmrs.api.context.Context;
import org.openmrs.module.webservices.rest.web.RestConstants;
import org.openmrs.module.webservices.rest.web.annotation.Resource;
import org.openmrs.module.webservices.rest.web.representation.DefaultRepresentation;
import org.openmrs.module.webservices.rest.web.representation.FullRepresentation;
import org.openmrs.module.webservices.rest.web.representation.Representation;
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.ProgramResource1_8;

@Resource(name = RestConstants.VERSION_1 + "/program", supportedClass = Program.class, supportedOpenmrsVersions = {"1.10.*", "1.11.*", "1.12.*"})
public class ProgramResource1_10 extends ProgramResource1_8{

    @Override
    public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
        if (rep instanceof DefaultRepresentation) {
            DelegatingResourceDescription description = new DelegatingResourceDescription();
            description.addProperty("name");
            description.addProperty("uuid");
            description.addProperty("retired");
            description.addProperty("description");
            description.addProperty("concept", Representation.REF);
            description.addProperty("outcomesConcept", Representation.REF);
            description.addSelfLink();
            description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
            return description;
        } else if (rep instanceof FullRepresentation) {
            DelegatingResourceDescription description = new DelegatingResourceDescription();
            description.addProperty("uuid");
            description.addProperty("name");
            description.addProperty("description");
            description.addProperty("retired");
            description.addProperty("concept");
            description.addProperty("outcomesConcept");
            description.addSelfLink();
            description.addProperty("auditInfo", findMethod("getAuditInfo"));
            return description;
        }
        return null;
    }


    @Override
    public DelegatingResourceDescription getCreatableProperties() {
        DelegatingResourceDescription description = new DelegatingResourceDescription();
        description.addRequiredProperty("name");
        description.addRequiredProperty("description");
        description.addRequiredProperty("concept");

        description.addProperty("outcomesConcept");<commit_msg>RESTWS-510 | REST endpoint for 'Program Enrollment'<commit_after>package org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_10;


import org.openmrs.Program;
import org.openmrs.api.context.Context;
import org.openmrs.module.webservices.rest.web.RestConstants;
import org.openmrs.module.webservices.rest.web.annotation.Resource;
import org.openmrs.module.webservices.rest.web.representation.DefaultRepresentation;
import org.openmrs.module.webservices.rest.web.representation.FullRepresentation;
import org.openmrs.module.webservices.rest.web.representation.Representation;
import org.openmrs.module.webservices.rest.web.resource.impl.DelegatingResourceDescription;
import org.openmrs.module.webservices.rest.web.v1_0.resource.openmrs1_8.ProgramResource1_8;

@Resource(name = RestConstants.VERSION_1 + "/program", supportedClass = Program.class, supportedOpenmrsVersions = {"1.10.*", "1.11.*", "1.12.*"})
public class ProgramResource1_10 extends ProgramResource1_8{

    @Override
    public DelegatingResourceDescription getRepresentationDescription(Representation rep) {
        if (rep instanceof DefaultRepresentation) {
            DelegatingResourceDescription description = new DelegatingResourceDescription();
            description.addProperty("name");
            description.addProperty("uuid");
            description.addProperty("retired");
            description.addProperty("description");
            description.addProperty("concept", Representation.REF);
            description.addProperty("outcomesConcept", Representation.FULL);
            description.addSelfLink();
            description.addLink("full", ".?v=" + RestConstants.REPRESENTATION_FULL);
            return description;
        } else if (rep instanceof FullRepresentation) {
            DelegatingResourceDescription description = new DelegatingResourceDescription();
            description.addProperty("uuid");
            description.addProperty("name");
            description.addProperty("description");
            description.addProperty("retired");
            description.addProperty("concept");
            description.addProperty("outcomesConcept");
            description.addSelfLink();
            description.addProperty("auditInfo", findMethod("getAuditInfo"));
            return description;
        }
        return null;
    }


    @Override
    public DelegatingResourceDescription getCreatableProperties() {
        DelegatingResourceDescription description = new DelegatingResourceDescription();
        description.addRequiredProperty("name");
        description.addRequiredProperty("description");
        description.addRequiredProperty("concept");

        description.addProperty("outcomesConcept");
{'fraction_non_alphanumeric': 0.10289507652590817, 'fraction_numerical': 0.010141987829614604, 'mean_word_length': 3.930909090909091, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7327542', 'n_tokens_mistral': 1373, 'n_tokens_neox': 1333, 'n_words': 194}