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

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

There is a newer version: 0.2.2
Show 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.ParameterMap;
import com.github.davidmoten.odata.client.internal.TypedObject;

import java.util.Map;

import microsoft.dynamics.crm.entity.Crmbaseentity;
import microsoft.dynamics.crm.entity.Timezonedefinition;
import microsoft.dynamics.crm.entity.request.TimezonedefinitionRequest;
import microsoft.dynamics.crm.entity.request.TimezonelocalizednameRequest;
import microsoft.dynamics.crm.entity.request.TimezoneruleRequest;
import microsoft.dynamics.crm.schema.SchemaInfo;

public class TimezonedefinitionCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public TimezonedefinitionCollectionRequest(ContextPath contextPath) {
        super(contextPath, Timezonedefinition.class, cp -> new TimezonedefinitionRequest(cp), SchemaInfo.INSTANCE);
        this.contextPath = contextPath;
    }

    public TimezonelocalizednameCollectionRequest lk_timezonelocalizedname_timezonedefinitionid() {
        return new TimezonelocalizednameCollectionRequest(contextPath.addSegment("lk_timezonelocalizedname_timezonedefinitionid"));
    }

    public TimezonelocalizednameRequest lk_timezonelocalizedname_timezonedefinitionid(String timezonelocalizednameid) {
        return new TimezonelocalizednameRequest(contextPath.addSegment("lk_timezonelocalizedname_timezonedefinitionid").addKeys(new NameValue(timezonelocalizednameid.toString())));
    }

    public TimezoneruleCollectionRequest lk_timezonerule_timezonedefinitionid() {
        return new TimezoneruleCollectionRequest(contextPath.addSegment("lk_timezonerule_timezonedefinitionid"));
    }

    public TimezoneruleRequest lk_timezonerule_timezonedefinitionid(String timezoneruleid) {
        return new TimezoneruleRequest(contextPath.addSegment("lk_timezonerule_timezonedefinitionid").addKeys(new NameValue(timezoneruleid.toString())));
    }

    @Function(name = "GetAllTimeZonesWithDisplayName")
    @JsonIgnore
    public CollectionPageNonEntityRequest getAllTimeZonesWithDisplayName(Integer localeId) {
        Preconditions.checkNotNull(localeId, "localeId cannot be null");
        Map _parameters = ParameterMap
            .put("LocaleId", "Edm.Int32", localeId)
            .build();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("Microsoft.Dynamics.CRM.GetAllTimeZonesWithDisplayName"), Crmbaseentity.class, _parameters, microsoft.dynamics.crm.schema.SchemaInfo.INSTANCE);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy