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

microsoft.dynamics.crm.entity.collection.request.SystemformCollectionRequest Maven / Gradle / Ivy

The newest version!
package microsoft.dynamics.crm.entity.collection.request;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.davidmoten.guavamini.Preconditions;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Function;
import com.github.davidmoten.odata.client.internal.Checks;
import com.github.davidmoten.odata.client.internal.ParameterMap;
import com.github.davidmoten.odata.client.internal.TypedObject;

import java.lang.Integer;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

import microsoft.dynamics.crm.entity.Systemform;
import microsoft.dynamics.crm.entity.Systemuser;
import microsoft.dynamics.crm.entity.request.AsyncoperationRequest;
import microsoft.dynamics.crm.entity.request.BulkdeletefailureRequest;
import microsoft.dynamics.crm.entity.request.ProcesstriggerRequest;
import microsoft.dynamics.crm.entity.request.SystemformRequest;

public class SystemformCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public SystemformCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Systemform.class, cp -> new SystemformRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public AsyncoperationRequest systemForm_AsyncOperations(UUID asyncoperationid) {
        return new AsyncoperationRequest(contextPath.addSegment("SystemForm_AsyncOperations").addKeys(new NameValue(asyncoperationid, UUID.class)), Optional.empty());
    }

    public AsyncoperationCollectionRequest systemForm_AsyncOperations() {
        return new AsyncoperationCollectionRequest(contextPath.addSegment("SystemForm_AsyncOperations"), Optional.empty());
    }

    public ProcesstriggerRequest processtrigger_systemform(UUID processtriggerid) {
        return new ProcesstriggerRequest(contextPath.addSegment("processtrigger_systemform").addKeys(new NameValue(processtriggerid, UUID.class)), Optional.empty());
    }

    public ProcesstriggerCollectionRequest processtrigger_systemform() {
        return new ProcesstriggerCollectionRequest(contextPath.addSegment("processtrigger_systemform"), Optional.empty());
    }

    public BulkdeletefailureRequest systemForm_BulkDeleteFailures(UUID bulkdeletefailureid) {
        return new BulkdeletefailureRequest(contextPath.addSegment("SystemForm_BulkDeleteFailures").addKeys(new NameValue(bulkdeletefailureid, UUID.class)), Optional.empty());
    }

    public BulkdeletefailureCollectionRequest systemForm_BulkDeleteFailures() {
        return new BulkdeletefailureCollectionRequest(contextPath.addSegment("SystemForm_BulkDeleteFailures"), Optional.empty());
    }

    public SystemformRequest form_ancestor_form(UUID formid) {
        return new SystemformRequest(contextPath.addSegment("form_ancestor_form").addKeys(new NameValue(formid, UUID.class)), Optional.empty());
    }

    public SystemformCollectionRequest form_ancestor_form() {
        return new SystemformCollectionRequest(contextPath.addSegment("form_ancestor_form"), Optional.empty());
    }

    @Function(name = "RetrieveFilteredForms")
    @JsonIgnore
    public CollectionPageNonEntityRequest retrieveFilteredForms(String entityLogicalName, Integer formType, Systemuser user) {
        Preconditions.checkNotNull(entityLogicalName, "entityLogicalName cannot be null");
        Preconditions.checkNotNull(formType, "formType cannot be null");
        Preconditions.checkNotNull(user, "user cannot be null");
        Map _parameters = ParameterMap
            .put("EntityLogicalName", "Edm.String", Checks.checkIsAscii(entityLogicalName))
            .put("FormType", "Edm.Int32", formType)
            .put("User", "Microsoft.Dynamics.CRM.systemuser", user)
            .build();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.RetrieveFilteredForms"), Systemform.class, _parameters);
    }

    @Function(name = "RetrieveUnpublishedMultiple")
    @JsonIgnore
    public CollectionPageNonEntityRequest retrieveUnpublishedMultiple() {
        Map _parameters = ParameterMap.empty();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.RetrieveUnpublishedMultiple"), Systemform.class, _parameters);
    }

}