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

microsoft.dynamics.crm.entity.request.CalendarRequest 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.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.FunctionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Function;
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.time.OffsetDateTime;
import java.util.Map;
import java.util.Optional;
import java.util.UUID;

import microsoft.dynamics.crm.complex.ExpandCalendarResponse;
import microsoft.dynamics.crm.entity.Calendar;
import microsoft.dynamics.crm.entity.collection.request.AnnotationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.AsyncoperationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.BulkdeletefailureCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.BusinessunitCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.CalendarCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.CalendarruleCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.OrganizationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SlaCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SlaitemCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SystemuserCollectionRequest;

@JsonIgnoreType
public class CalendarRequest extends EntityRequest {

    public CalendarRequest(ContextPath contextPath, Optional value) {
        super(Calendar.class, contextPath, value, false);
    }

    public CalendarruleRequest calendar_calendar_rules(UUID calendarruleid) {
        return new CalendarruleRequest(contextPath.addSegment("calendar_calendar_rules").addKeys(new NameValue(calendarruleid, UUID.class)), Optional.empty());
    }

    public CalendarruleCollectionRequest calendar_calendar_rules() {
        return new CalendarruleCollectionRequest(
                        contextPath.addSegment("calendar_calendar_rules"), Optional.empty());
    }

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

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

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

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

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

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

    public OrganizationRequest calendar_organization(UUID organizationid) {
        return new OrganizationRequest(contextPath.addSegment("calendar_organization").addKeys(new NameValue(organizationid, UUID.class)), Optional.empty());
    }

    public OrganizationCollectionRequest calendar_organization() {
        return new OrganizationCollectionRequest(
                        contextPath.addSegment("calendar_organization"), Optional.empty());
    }

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

    public BusinessunitRequest businessUnit_Calendar(UUID businessunitid) {
        return new BusinessunitRequest(contextPath.addSegment("BusinessUnit_Calendar").addKeys(new NameValue(businessunitid, UUID.class)), Optional.empty());
    }

    public BusinessunitCollectionRequest businessUnit_Calendar() {
        return new BusinessunitCollectionRequest(
                        contextPath.addSegment("BusinessUnit_Calendar"), Optional.empty());
    }

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

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

    public CalendarRequest holidayschedulecalendarid() {
        return new CalendarRequest(contextPath.addSegment("holidayschedulecalendarid"), Optional.empty());
    }

    public CalendarRequest calendar_customercalendar_holidaycalendar(UUID calendarid) {
        return new CalendarRequest(contextPath.addSegment("calendar_customercalendar_holidaycalendar").addKeys(new NameValue(calendarid, UUID.class)), Optional.empty());
    }

    public CalendarCollectionRequest calendar_customercalendar_holidaycalendar() {
        return new CalendarCollectionRequest(
                        contextPath.addSegment("calendar_customercalendar_holidaycalendar"), Optional.empty());
    }

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

    public SystemuserRequest calendar_system_users(UUID ownerid) {
        return new SystemuserRequest(contextPath.addSegment("calendar_system_users").addKeys(new NameValue(ownerid, UUID.class)), Optional.empty());
    }

    public SystemuserCollectionRequest calendar_system_users() {
        return new SystemuserCollectionRequest(
                        contextPath.addSegment("calendar_system_users"), Optional.empty());
    }

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

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

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

    public CalendarruleRequest inner_calendar_calendar_rules(UUID calendarruleid) {
        return new CalendarruleRequest(contextPath.addSegment("inner_calendar_calendar_rules").addKeys(new NameValue(calendarruleid, UUID.class)), Optional.empty());
    }

    public CalendarruleCollectionRequest inner_calendar_calendar_rules() {
        return new CalendarruleCollectionRequest(
                        contextPath.addSegment("inner_calendar_calendar_rules"), Optional.empty());
    }

    public OrganizationRequest organizationid() {
        return new OrganizationRequest(contextPath.addSegment("organizationid"), Optional.empty());
    }

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

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

    @Function(name = "ExpandCalendar")
    @JsonIgnore
    public FunctionRequestReturningNonCollectionUnwrapped expandCalendar(OffsetDateTime start, OffsetDateTime end) {
        Preconditions.checkNotNull(start, "start cannot be null");
        Preconditions.checkNotNull(end, "end cannot be null");
        Map _parameters = ParameterMap
            .put("Start", "Edm.DateTimeOffset", start)
            .put("End", "Edm.DateTimeOffset", end)
            .build();
        return new FunctionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.ExpandCalendar"), ExpandCalendarResponse.class, _parameters);
    }

}