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

microsoft.dynamics.crm.entity.request.WorkflowRequest Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.guavamini.Preconditions;
import com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Action;
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.Object;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

import microsoft.dynamics.crm.complex.InputArgumentCollection;
import microsoft.dynamics.crm.entity.Asyncoperation;
import microsoft.dynamics.crm.entity.Workflow;
import microsoft.dynamics.crm.entity.collection.request.AnnotationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.AsyncoperationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ExpiredprocessCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.FlowsessionCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.Msdyn_aimodelCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.Msdyn_solutionhealthruleCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.NewprocessCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ProcesssessionCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ProcessstageCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ProcesstriggerCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SlaCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SlaitemCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SyncerrorCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.TranslationprocessCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.WorkflowCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.WorkflowbinaryCollectionRequest;

@JsonIgnoreType
public class WorkflowRequest extends EntityRequest {

    public WorkflowRequest(ContextPath contextPath, Optional value) {
        super(Workflow.class, contextPath, value, false);
    }

    public SlaRequest slabase_workflowid(UUID slaid) {
        return new SlaRequest(contextPath.addSegment("slabase_workflowid").addKeys(new NameValue(slaid, UUID.class)), Optional.empty());
    }

    public SlaCollectionRequest slabase_workflowid() {
        return new SlaCollectionRequest(
                        contextPath.addSegment("slabase_workflowid"), Optional.empty());
    }

    public BusinessunitRequest owningbusinessunit() {
        return new BusinessunitRequest(contextPath.addSegment("owningbusinessunit"), Optional.empty());
    }

    public SystemuserRequest createdonbehalfby() {
        return new SystemuserRequest(contextPath.addSegment("createdonbehalfby"), Optional.empty());
    }

    public PrincipalRequest ownerid() {
        return new PrincipalRequest(contextPath.addSegment("ownerid"), Optional.empty());
    }

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

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

    public WorkflowRequest parentworkflowid() {
        return new WorkflowRequest(contextPath.addSegment("parentworkflowid"), Optional.empty());
    }

    public WorkflowRequest workflow_parent_workflow(UUID workflowid) {
        return new WorkflowRequest(contextPath.addSegment("workflow_parent_workflow").addKeys(new NameValue(workflowid, UUID.class)), Optional.empty());
    }

    public WorkflowCollectionRequest workflow_parent_workflow() {
        return new WorkflowCollectionRequest(
                        contextPath.addSegment("workflow_parent_workflow"), Optional.empty());
    }

    public ExpiredprocessRequest workflow_expiredprocess(UUID businessprocessflowinstanceid) {
        return new ExpiredprocessRequest(contextPath.addSegment("workflow_expiredprocess").addKeys(new NameValue(businessprocessflowinstanceid, UUID.class)), Optional.empty());
    }

    public ExpiredprocessCollectionRequest workflow_expiredprocess() {
        return new ExpiredprocessCollectionRequest(
                        contextPath.addSegment("workflow_expiredprocess"), Optional.empty());
    }

    public SlaitemRequest slaitembase_workflowid(UUID slaitemid) {
        return new SlaitemRequest(contextPath.addSegment("slaitembase_workflowid").addKeys(new NameValue(slaitemid, UUID.class)), Optional.empty());
    }

    public SlaitemCollectionRequest slaitembase_workflowid() {
        return new SlaitemCollectionRequest(
                        contextPath.addSegment("slaitembase_workflowid"), Optional.empty());
    }

    public TranslationprocessRequest workflow_translationprocess(UUID businessprocessflowinstanceid) {
        return new TranslationprocessRequest(contextPath.addSegment("workflow_translationprocess").addKeys(new NameValue(businessprocessflowinstanceid, UUID.class)), Optional.empty());
    }

    public TranslationprocessCollectionRequest workflow_translationprocess() {
        return new TranslationprocessCollectionRequest(
                        contextPath.addSegment("workflow_translationprocess"), Optional.empty());
    }

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

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

    public TeamRequest owningteam() {
        return new TeamRequest(contextPath.addSegment("owningteam"), Optional.empty());
    }

    public AnnotationRequest workflow_Annotation(UUID annotationid) {
        return new AnnotationRequest(contextPath.addSegment("Workflow_Annotation").addKeys(new NameValue(annotationid, UUID.class)), Optional.empty());
    }

    public AnnotationCollectionRequest workflow_Annotation() {
        return new AnnotationCollectionRequest(
                        contextPath.addSegment("Workflow_Annotation"), Optional.empty());
    }

    public ProcesssessionRequest lk_processsession_processid(UUID processsessionid) {
        return new ProcesssessionRequest(contextPath.addSegment("lk_processsession_processid").addKeys(new NameValue(processsessionid, UUID.class)), Optional.empty());
    }

    public ProcesssessionCollectionRequest lk_processsession_processid() {
        return new ProcesssessionCollectionRequest(
                        contextPath.addSegment("lk_processsession_processid"), Optional.empty());
    }

    public ProcessstageRequest process_processstage(UUID processstageid) {
        return new ProcessstageRequest(contextPath.addSegment("process_processstage").addKeys(new NameValue(processstageid, UUID.class)), Optional.empty());
    }

    public ProcessstageCollectionRequest process_processstage() {
        return new ProcessstageCollectionRequest(
                        contextPath.addSegment("process_processstage"), Optional.empty());
    }

    public SyncerrorRequest workflow_SyncErrors(UUID syncerrorid) {
        return new SyncerrorRequest(contextPath.addSegment("Workflow_SyncErrors").addKeys(new NameValue(syncerrorid, UUID.class)), Optional.empty());
    }

    public SyncerrorCollectionRequest workflow_SyncErrors() {
        return new SyncerrorCollectionRequest(
                        contextPath.addSegment("Workflow_SyncErrors"), Optional.empty());
    }

    public NewprocessRequest workflow_newprocess(UUID businessprocessflowinstanceid) {
        return new NewprocessRequest(contextPath.addSegment("workflow_newprocess").addKeys(new NameValue(businessprocessflowinstanceid, UUID.class)), Optional.empty());
    }

    public NewprocessCollectionRequest workflow_newprocess() {
        return new NewprocessCollectionRequest(
                        contextPath.addSegment("workflow_newprocess"), Optional.empty());
    }

    public WorkflowRequest activeworkflowid() {
        return new WorkflowRequest(contextPath.addSegment("activeworkflowid"), Optional.empty());
    }

    public WorkflowRequest workflow_active_workflow(UUID workflowid) {
        return new WorkflowRequest(contextPath.addSegment("workflow_active_workflow").addKeys(new NameValue(workflowid, UUID.class)), Optional.empty());
    }

    public WorkflowCollectionRequest workflow_active_workflow() {
        return new WorkflowCollectionRequest(
                        contextPath.addSegment("workflow_active_workflow"), Optional.empty());
    }

    public SystemuserRequest modifiedonbehalfby() {
        return new SystemuserRequest(contextPath.addSegment("modifiedonbehalfby"), Optional.empty());
    }

    public SystemuserRequest createdby() {
        return new SystemuserRequest(contextPath.addSegment("createdby"), Optional.empty());
    }

    public SystemuserRequest modifiedby() {
        return new SystemuserRequest(contextPath.addSegment("modifiedby"), Optional.empty());
    }

    public SystemuserRequest owninguser() {
        return new SystemuserRequest(contextPath.addSegment("owninguser"), Optional.empty());
    }

    public FlowsessionRequest regardingobjectid_process(UUID flowsessionid) {
        return new FlowsessionRequest(contextPath.addSegment("regardingobjectid_process").addKeys(new NameValue(flowsessionid, UUID.class)), Optional.empty());
    }

    public FlowsessionCollectionRequest regardingobjectid_process() {
        return new FlowsessionCollectionRequest(
                        contextPath.addSegment("regardingobjectid_process"), Optional.empty());
    }

    public WorkflowbinaryRequest workflow_workflowbinary_Process(UUID workflowbinaryid) {
        return new WorkflowbinaryRequest(contextPath.addSegment("workflow_workflowbinary_Process").addKeys(new NameValue(workflowbinaryid, UUID.class)), Optional.empty());
    }

    public WorkflowbinaryCollectionRequest workflow_workflowbinary_Process() {
        return new WorkflowbinaryCollectionRequest(
                        contextPath.addSegment("workflow_workflowbinary_Process"), Optional.empty());
    }

    public Msdyn_aimodelRequest msdyn_retrainworkflow_msdyn_toaimodel(UUID msdyn_aimodelid) {
        return new Msdyn_aimodelRequest(contextPath.addSegment("msdyn_retrainworkflow_msdyn_toaimodel").addKeys(new NameValue(msdyn_aimodelid, UUID.class)), Optional.empty());
    }

    public Msdyn_aimodelCollectionRequest msdyn_retrainworkflow_msdyn_toaimodel() {
        return new Msdyn_aimodelCollectionRequest(
                        contextPath.addSegment("msdyn_retrainworkflow_msdyn_toaimodel"), Optional.empty());
    }

    public Msdyn_solutionhealthruleRequest msdyn_workflow_msdyn_solutionhealthrule_Workflow(UUID msdyn_solutionhealthruleid) {
        return new Msdyn_solutionhealthruleRequest(contextPath.addSegment("msdyn_workflow_msdyn_solutionhealthrule_Workflow").addKeys(new NameValue(msdyn_solutionhealthruleid, UUID.class)), Optional.empty());
    }

    public Msdyn_solutionhealthruleCollectionRequest msdyn_workflow_msdyn_solutionhealthrule_Workflow() {
        return new Msdyn_solutionhealthruleCollectionRequest(
                        contextPath.addSegment("msdyn_workflow_msdyn_solutionhealthrule_Workflow"), Optional.empty());
    }

    public Msdyn_solutionhealthruleRequest msdyn_workflow_msdyn_solutionhealthrule_resolutionaction(UUID msdyn_solutionhealthruleid) {
        return new Msdyn_solutionhealthruleRequest(contextPath.addSegment("msdyn_workflow_msdyn_solutionhealthrule_resolutionaction").addKeys(new NameValue(msdyn_solutionhealthruleid, UUID.class)), Optional.empty());
    }

    public Msdyn_solutionhealthruleCollectionRequest msdyn_workflow_msdyn_solutionhealthrule_resolutionaction() {
        return new Msdyn_solutionhealthruleCollectionRequest(
                        contextPath.addSegment("msdyn_workflow_msdyn_solutionhealthrule_resolutionaction"), Optional.empty());
    }

    public Msdyn_aimodelRequest msdyn_scheduleinferenceworkflow_msdyn_toaimodel(UUID msdyn_aimodelid) {
        return new Msdyn_aimodelRequest(contextPath.addSegment("msdyn_scheduleinferenceworkflow_msdyn_toaimodel").addKeys(new NameValue(msdyn_aimodelid, UUID.class)), Optional.empty());
    }

    public Msdyn_aimodelCollectionRequest msdyn_scheduleinferenceworkflow_msdyn_toaimodel() {
        return new Msdyn_aimodelCollectionRequest(
                        contextPath.addSegment("msdyn_scheduleinferenceworkflow_msdyn_toaimodel"), Optional.empty());
    }

    @Action(name = "CreateWorkflowFromTemplate")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped createWorkflowFromTemplate(String workflowName) {
        Preconditions.checkNotNull(workflowName, "workflowName cannot be null");
        Map _parameters = ParameterMap
            .put("WorkflowName", "Edm.String", Checks.checkIsAscii(workflowName))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.CreateWorkflowFromTemplate"), Workflow.class, _parameters);
    }

    @Action(name = "ExecuteWorkflow")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped executeWorkflow(UUID entityId, InputArgumentCollection inputArguments) {
        Preconditions.checkNotNull(entityId, "entityId cannot be null");
        Map _parameters = ParameterMap
            .put("EntityId", "Edm.Guid", entityId)
            .put("InputArguments", "Microsoft.Dynamics.CRM.InputArgumentCollection", inputArguments)
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.ExecuteWorkflow"), Asyncoperation.class, _parameters);
    }

    @Action(name = "InitializeModernFlowFromAsyncWorkflow")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped initializeModernFlowFromAsyncWorkflow() {
        Map _parameters = ParameterMap.empty();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.InitializeModernFlowFromAsyncWorkflow"), Workflow.class, _parameters);
    }

}