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

microsoft.dynamics.crm.entity.Timezonerule Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package microsoft.dynamics.crm.entity;

import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.davidmoten.odata.client.ClientException;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.ODataEntityType;
import com.github.davidmoten.odata.client.RequestOptions;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.NavigationProperty;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFields;

import java.time.OffsetDateTime;
import java.util.Optional;

import microsoft.dynamics.crm.entity.request.SystemuserRequest;
import microsoft.dynamics.crm.entity.request.TimezonedefinitionRequest;

@JsonPropertyOrder({
    "@odata.type", 
    "daylighthour", 
    "daylightminute", 
    "standardsecond", 
    "createdon", 
    "standardmonth", 
    "standardhour", 
    "bias", 
    "_timezonedefinitionid_value", 
    "versionnumber", 
    "modifiedon", 
    "standardday", 
    "daylightbias", 
    "standardminute", 
    "_createdonbehalfby_value", 
    "timezoneruleid", 
    "daylightyear", 
    "standardbias", 
    "timezoneruleversionnumber", 
    "standardyear", 
    "_modifiedonbehalfby_value", 
    "_createdby_value", 
    "standarddayofweek", 
    "daylightsecond", 
    "daylightmonth", 
    "_organizationid_value", 
    "daylightdayofweek", 
    "_modifiedby_value", 
    "daylightday", 
    "effectivedatetime"})
@JsonInclude(Include.NON_NULL)
public class Timezonerule extends Crmbaseentity implements ODataEntityType {

    @Override
    public String odataTypeName() {
        return "Microsoft.Dynamics.CRM.timezonerule";
    }

    @JsonProperty("daylighthour")
    protected Integer daylighthour;

    @JsonProperty("daylightminute")
    protected Integer daylightminute;

    @JsonProperty("standardsecond")
    protected Integer standardsecond;

    @JsonProperty("createdon")
    protected OffsetDateTime createdon;

    @JsonProperty("standardmonth")
    protected Integer standardmonth;

    @JsonProperty("standardhour")
    protected Integer standardhour;

    @JsonProperty("bias")
    protected Integer bias;

    @JsonProperty("_timezonedefinitionid_value")
    protected String _timezonedefinitionid_value;

    @JsonProperty("versionnumber")
    protected Long versionnumber;

    @JsonProperty("modifiedon")
    protected OffsetDateTime modifiedon;

    @JsonProperty("standardday")
    protected Integer standardday;

    @JsonProperty("daylightbias")
    protected Integer daylightbias;

    @JsonProperty("standardminute")
    protected Integer standardminute;

    @JsonProperty("_createdonbehalfby_value")
    protected String _createdonbehalfby_value;

    @JsonProperty("timezoneruleid")
    protected String timezoneruleid;

    @JsonProperty("daylightyear")
    protected Integer daylightyear;

    @JsonProperty("standardbias")
    protected Integer standardbias;

    @JsonProperty("timezoneruleversionnumber")
    protected Integer timezoneruleversionnumber;

    @JsonProperty("standardyear")
    protected Integer standardyear;

    @JsonProperty("_modifiedonbehalfby_value")
    protected String _modifiedonbehalfby_value;

    @JsonProperty("_createdby_value")
    protected String _createdby_value;

    @JsonProperty("standarddayofweek")
    protected Integer standarddayofweek;

    @JsonProperty("daylightsecond")
    protected Integer daylightsecond;

    @JsonProperty("daylightmonth")
    protected Integer daylightmonth;

    @JsonProperty("_organizationid_value")
    protected String _organizationid_value;

    @JsonProperty("daylightdayofweek")
    protected Integer daylightdayofweek;

    @JsonProperty("_modifiedby_value")
    protected String _modifiedby_value;

    @JsonProperty("daylightday")
    protected Integer daylightday;

    @JsonProperty("effectivedatetime")
    protected OffsetDateTime effectivedatetime;

    protected Timezonerule() {
        super();
    }

    /**
     * Returns a builder which is used to create a new
     * instance of this class (given that this class is immutable).
     *
     * @return a new Builder for this class
     */
    // Suffix used on builder factory method to differentiate the method
    // from static builder methods on superclasses
    public static Builder builderTimezonerule() {
        return new Builder();
    }

    public static final class Builder {
        private Integer daylighthour;
        private Integer daylightminute;
        private Integer standardsecond;
        private OffsetDateTime createdon;
        private Integer standardmonth;
        private Integer standardhour;
        private Integer bias;
        private String _timezonedefinitionid_value;
        private Long versionnumber;
        private OffsetDateTime modifiedon;
        private Integer standardday;
        private Integer daylightbias;
        private Integer standardminute;
        private String _createdonbehalfby_value;
        private String timezoneruleid;
        private Integer daylightyear;
        private Integer standardbias;
        private Integer timezoneruleversionnumber;
        private Integer standardyear;
        private String _modifiedonbehalfby_value;
        private String _createdby_value;
        private Integer standarddayofweek;
        private Integer daylightsecond;
        private Integer daylightmonth;
        private String _organizationid_value;
        private Integer daylightdayofweek;
        private String _modifiedby_value;
        private Integer daylightday;
        private OffsetDateTime effectivedatetime;
        private ChangedFields changedFields = new ChangedFields();

        Builder() {
            // prevent instantiation
        }

        public Builder daylighthour(Integer daylighthour) {
            this.daylighthour = daylighthour;
            this.changedFields = changedFields.add("daylighthour");
            return this;
        }

        public Builder daylightminute(Integer daylightminute) {
            this.daylightminute = daylightminute;
            this.changedFields = changedFields.add("daylightminute");
            return this;
        }

        public Builder standardsecond(Integer standardsecond) {
            this.standardsecond = standardsecond;
            this.changedFields = changedFields.add("standardsecond");
            return this;
        }

        public Builder createdon(OffsetDateTime createdon) {
            this.createdon = createdon;
            this.changedFields = changedFields.add("createdon");
            return this;
        }

        public Builder standardmonth(Integer standardmonth) {
            this.standardmonth = standardmonth;
            this.changedFields = changedFields.add("standardmonth");
            return this;
        }

        public Builder standardhour(Integer standardhour) {
            this.standardhour = standardhour;
            this.changedFields = changedFields.add("standardhour");
            return this;
        }

        public Builder bias(Integer bias) {
            this.bias = bias;
            this.changedFields = changedFields.add("bias");
            return this;
        }

        public Builder _timezonedefinitionid_value(String _timezonedefinitionid_value) {
            this._timezonedefinitionid_value = _timezonedefinitionid_value;
            this.changedFields = changedFields.add("_timezonedefinitionid_value");
            return this;
        }

        public Builder versionnumber(Long versionnumber) {
            this.versionnumber = versionnumber;
            this.changedFields = changedFields.add("versionnumber");
            return this;
        }

        public Builder modifiedon(OffsetDateTime modifiedon) {
            this.modifiedon = modifiedon;
            this.changedFields = changedFields.add("modifiedon");
            return this;
        }

        public Builder standardday(Integer standardday) {
            this.standardday = standardday;
            this.changedFields = changedFields.add("standardday");
            return this;
        }

        public Builder daylightbias(Integer daylightbias) {
            this.daylightbias = daylightbias;
            this.changedFields = changedFields.add("daylightbias");
            return this;
        }

        public Builder standardminute(Integer standardminute) {
            this.standardminute = standardminute;
            this.changedFields = changedFields.add("standardminute");
            return this;
        }

        public Builder _createdonbehalfby_value(String _createdonbehalfby_value) {
            this._createdonbehalfby_value = _createdonbehalfby_value;
            this.changedFields = changedFields.add("_createdonbehalfby_value");
            return this;
        }

        public Builder timezoneruleid(String timezoneruleid) {
            this.timezoneruleid = timezoneruleid;
            this.changedFields = changedFields.add("timezoneruleid");
            return this;
        }

        public Builder daylightyear(Integer daylightyear) {
            this.daylightyear = daylightyear;
            this.changedFields = changedFields.add("daylightyear");
            return this;
        }

        public Builder standardbias(Integer standardbias) {
            this.standardbias = standardbias;
            this.changedFields = changedFields.add("standardbias");
            return this;
        }

        public Builder timezoneruleversionnumber(Integer timezoneruleversionnumber) {
            this.timezoneruleversionnumber = timezoneruleversionnumber;
            this.changedFields = changedFields.add("timezoneruleversionnumber");
            return this;
        }

        public Builder standardyear(Integer standardyear) {
            this.standardyear = standardyear;
            this.changedFields = changedFields.add("standardyear");
            return this;
        }

        public Builder _modifiedonbehalfby_value(String _modifiedonbehalfby_value) {
            this._modifiedonbehalfby_value = _modifiedonbehalfby_value;
            this.changedFields = changedFields.add("_modifiedonbehalfby_value");
            return this;
        }

        public Builder _createdby_value(String _createdby_value) {
            this._createdby_value = _createdby_value;
            this.changedFields = changedFields.add("_createdby_value");
            return this;
        }

        public Builder standarddayofweek(Integer standarddayofweek) {
            this.standarddayofweek = standarddayofweek;
            this.changedFields = changedFields.add("standarddayofweek");
            return this;
        }

        public Builder daylightsecond(Integer daylightsecond) {
            this.daylightsecond = daylightsecond;
            this.changedFields = changedFields.add("daylightsecond");
            return this;
        }

        public Builder daylightmonth(Integer daylightmonth) {
            this.daylightmonth = daylightmonth;
            this.changedFields = changedFields.add("daylightmonth");
            return this;
        }

        public Builder _organizationid_value(String _organizationid_value) {
            this._organizationid_value = _organizationid_value;
            this.changedFields = changedFields.add("_organizationid_value");
            return this;
        }

        public Builder daylightdayofweek(Integer daylightdayofweek) {
            this.daylightdayofweek = daylightdayofweek;
            this.changedFields = changedFields.add("daylightdayofweek");
            return this;
        }

        public Builder _modifiedby_value(String _modifiedby_value) {
            this._modifiedby_value = _modifiedby_value;
            this.changedFields = changedFields.add("_modifiedby_value");
            return this;
        }

        public Builder daylightday(Integer daylightday) {
            this.daylightday = daylightday;
            this.changedFields = changedFields.add("daylightday");
            return this;
        }

        public Builder effectivedatetime(OffsetDateTime effectivedatetime) {
            this.effectivedatetime = effectivedatetime;
            this.changedFields = changedFields.add("effectivedatetime");
            return this;
        }

        public Timezonerule build() {
            Timezonerule _x = new Timezonerule();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFields();
            _x.odataType = "Microsoft.Dynamics.CRM.timezonerule";
            _x.daylighthour = daylighthour;
            _x.daylightminute = daylightminute;
            _x.standardsecond = standardsecond;
            _x.createdon = createdon;
            _x.standardmonth = standardmonth;
            _x.standardhour = standardhour;
            _x.bias = bias;
            _x._timezonedefinitionid_value = _timezonedefinitionid_value;
            _x.versionnumber = versionnumber;
            _x.modifiedon = modifiedon;
            _x.standardday = standardday;
            _x.daylightbias = daylightbias;
            _x.standardminute = standardminute;
            _x._createdonbehalfby_value = _createdonbehalfby_value;
            _x.timezoneruleid = timezoneruleid;
            _x.daylightyear = daylightyear;
            _x.standardbias = standardbias;
            _x.timezoneruleversionnumber = timezoneruleversionnumber;
            _x.standardyear = standardyear;
            _x._modifiedonbehalfby_value = _modifiedonbehalfby_value;
            _x._createdby_value = _createdby_value;
            _x.standarddayofweek = standarddayofweek;
            _x.daylightsecond = daylightsecond;
            _x.daylightmonth = daylightmonth;
            _x._organizationid_value = _organizationid_value;
            _x.daylightdayofweek = daylightdayofweek;
            _x._modifiedby_value = _modifiedby_value;
            _x.daylightday = daylightday;
            _x.effectivedatetime = effectivedatetime;
            return _x;
        }
    }

    @Override
    @JsonIgnore
    public ChangedFields getChangedFields() {
        return changedFields;
    }

    @Override
    public void postInject(boolean addKeysToContextPath) {
        if (addKeysToContextPath && timezoneruleid != null) {
            contextPath = contextPath.clearQueries().addKeys(new NameValue(timezoneruleid.toString()));
        }
    }

    @Property(name="daylighthour")
    @JsonIgnore
    public Optional getDaylighthour() {
        return Optional.ofNullable(daylighthour);
    }

    public Timezonerule withDaylighthour(Integer daylighthour) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylighthour");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylighthour = daylighthour;
        return _x;
    }

    @Property(name="daylightminute")
    @JsonIgnore
    public Optional getDaylightminute() {
        return Optional.ofNullable(daylightminute);
    }

    public Timezonerule withDaylightminute(Integer daylightminute) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightminute");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightminute = daylightminute;
        return _x;
    }

    @Property(name="standardsecond")
    @JsonIgnore
    public Optional getStandardsecond() {
        return Optional.ofNullable(standardsecond);
    }

    public Timezonerule withStandardsecond(Integer standardsecond) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardsecond");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardsecond = standardsecond;
        return _x;
    }

    @Property(name="createdon")
    @JsonIgnore
    public Optional getCreatedon() {
        return Optional.ofNullable(createdon);
    }

    public Timezonerule withCreatedon(OffsetDateTime createdon) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("createdon");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.createdon = createdon;
        return _x;
    }

    @Property(name="standardmonth")
    @JsonIgnore
    public Optional getStandardmonth() {
        return Optional.ofNullable(standardmonth);
    }

    public Timezonerule withStandardmonth(Integer standardmonth) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardmonth");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardmonth = standardmonth;
        return _x;
    }

    @Property(name="standardhour")
    @JsonIgnore
    public Optional getStandardhour() {
        return Optional.ofNullable(standardhour);
    }

    public Timezonerule withStandardhour(Integer standardhour) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardhour");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardhour = standardhour;
        return _x;
    }

    @Property(name="bias")
    @JsonIgnore
    public Optional getBias() {
        return Optional.ofNullable(bias);
    }

    public Timezonerule withBias(Integer bias) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("bias");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.bias = bias;
        return _x;
    }

    @Property(name="_timezonedefinitionid_value")
    @JsonIgnore
    public Optional get_timezonedefinitionid_value() {
        return Optional.ofNullable(_timezonedefinitionid_value);
    }

    public Timezonerule with_timezonedefinitionid_value(String _timezonedefinitionid_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_timezonedefinitionid_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._timezonedefinitionid_value = _timezonedefinitionid_value;
        return _x;
    }

    @Property(name="versionnumber")
    @JsonIgnore
    public Optional getVersionnumber() {
        return Optional.ofNullable(versionnumber);
    }

    public Timezonerule withVersionnumber(Long versionnumber) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("versionnumber");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.versionnumber = versionnumber;
        return _x;
    }

    @Property(name="modifiedon")
    @JsonIgnore
    public Optional getModifiedon() {
        return Optional.ofNullable(modifiedon);
    }

    public Timezonerule withModifiedon(OffsetDateTime modifiedon) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("modifiedon");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.modifiedon = modifiedon;
        return _x;
    }

    @Property(name="standardday")
    @JsonIgnore
    public Optional getStandardday() {
        return Optional.ofNullable(standardday);
    }

    public Timezonerule withStandardday(Integer standardday) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardday");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardday = standardday;
        return _x;
    }

    @Property(name="daylightbias")
    @JsonIgnore
    public Optional getDaylightbias() {
        return Optional.ofNullable(daylightbias);
    }

    public Timezonerule withDaylightbias(Integer daylightbias) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightbias");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightbias = daylightbias;
        return _x;
    }

    @Property(name="standardminute")
    @JsonIgnore
    public Optional getStandardminute() {
        return Optional.ofNullable(standardminute);
    }

    public Timezonerule withStandardminute(Integer standardminute) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardminute");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardminute = standardminute;
        return _x;
    }

    @Property(name="_createdonbehalfby_value")
    @JsonIgnore
    public Optional get_createdonbehalfby_value() {
        return Optional.ofNullable(_createdonbehalfby_value);
    }

    public Timezonerule with_createdonbehalfby_value(String _createdonbehalfby_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_createdonbehalfby_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._createdonbehalfby_value = _createdonbehalfby_value;
        return _x;
    }

    @Property(name="timezoneruleid")
    @JsonIgnore
    public Optional getTimezoneruleid() {
        return Optional.ofNullable(timezoneruleid);
    }

    public Timezonerule withTimezoneruleid(String timezoneruleid) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("timezoneruleid");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.timezoneruleid = timezoneruleid;
        return _x;
    }

    @Property(name="daylightyear")
    @JsonIgnore
    public Optional getDaylightyear() {
        return Optional.ofNullable(daylightyear);
    }

    public Timezonerule withDaylightyear(Integer daylightyear) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightyear");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightyear = daylightyear;
        return _x;
    }

    @Property(name="standardbias")
    @JsonIgnore
    public Optional getStandardbias() {
        return Optional.ofNullable(standardbias);
    }

    public Timezonerule withStandardbias(Integer standardbias) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardbias");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardbias = standardbias;
        return _x;
    }

    @Property(name="timezoneruleversionnumber")
    @JsonIgnore
    public Optional getTimezoneruleversionnumber() {
        return Optional.ofNullable(timezoneruleversionnumber);
    }

    public Timezonerule withTimezoneruleversionnumber(Integer timezoneruleversionnumber) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("timezoneruleversionnumber");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.timezoneruleversionnumber = timezoneruleversionnumber;
        return _x;
    }

    @Property(name="standardyear")
    @JsonIgnore
    public Optional getStandardyear() {
        return Optional.ofNullable(standardyear);
    }

    public Timezonerule withStandardyear(Integer standardyear) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standardyear");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standardyear = standardyear;
        return _x;
    }

    @Property(name="_modifiedonbehalfby_value")
    @JsonIgnore
    public Optional get_modifiedonbehalfby_value() {
        return Optional.ofNullable(_modifiedonbehalfby_value);
    }

    public Timezonerule with_modifiedonbehalfby_value(String _modifiedonbehalfby_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_modifiedonbehalfby_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._modifiedonbehalfby_value = _modifiedonbehalfby_value;
        return _x;
    }

    @Property(name="_createdby_value")
    @JsonIgnore
    public Optional get_createdby_value() {
        return Optional.ofNullable(_createdby_value);
    }

    public Timezonerule with_createdby_value(String _createdby_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_createdby_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._createdby_value = _createdby_value;
        return _x;
    }

    @Property(name="standarddayofweek")
    @JsonIgnore
    public Optional getStandarddayofweek() {
        return Optional.ofNullable(standarddayofweek);
    }

    public Timezonerule withStandarddayofweek(Integer standarddayofweek) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("standarddayofweek");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.standarddayofweek = standarddayofweek;
        return _x;
    }

    @Property(name="daylightsecond")
    @JsonIgnore
    public Optional getDaylightsecond() {
        return Optional.ofNullable(daylightsecond);
    }

    public Timezonerule withDaylightsecond(Integer daylightsecond) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightsecond");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightsecond = daylightsecond;
        return _x;
    }

    @Property(name="daylightmonth")
    @JsonIgnore
    public Optional getDaylightmonth() {
        return Optional.ofNullable(daylightmonth);
    }

    public Timezonerule withDaylightmonth(Integer daylightmonth) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightmonth");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightmonth = daylightmonth;
        return _x;
    }

    @Property(name="_organizationid_value")
    @JsonIgnore
    public Optional get_organizationid_value() {
        return Optional.ofNullable(_organizationid_value);
    }

    public Timezonerule with_organizationid_value(String _organizationid_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_organizationid_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._organizationid_value = _organizationid_value;
        return _x;
    }

    @Property(name="daylightdayofweek")
    @JsonIgnore
    public Optional getDaylightdayofweek() {
        return Optional.ofNullable(daylightdayofweek);
    }

    public Timezonerule withDaylightdayofweek(Integer daylightdayofweek) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightdayofweek");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightdayofweek = daylightdayofweek;
        return _x;
    }

    @Property(name="_modifiedby_value")
    @JsonIgnore
    public Optional get_modifiedby_value() {
        return Optional.ofNullable(_modifiedby_value);
    }

    public Timezonerule with_modifiedby_value(String _modifiedby_value) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("_modifiedby_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x._modifiedby_value = _modifiedby_value;
        return _x;
    }

    @Property(name="daylightday")
    @JsonIgnore
    public Optional getDaylightday() {
        return Optional.ofNullable(daylightday);
    }

    public Timezonerule withDaylightday(Integer daylightday) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("daylightday");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.daylightday = daylightday;
        return _x;
    }

    @Property(name="effectivedatetime")
    @JsonIgnore
    public Optional getEffectivedatetime() {
        return Optional.ofNullable(effectivedatetime);
    }

    public Timezonerule withEffectivedatetime(OffsetDateTime effectivedatetime) {
        Timezonerule _x = _copy();
        _x.changedFields = changedFields.add("effectivedatetime");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.timezonerule");
        _x.effectivedatetime = effectivedatetime;
        return _x;
    }

    @NavigationProperty(name="createdby")
    @JsonIgnore
    public SystemuserRequest getCreatedby() {
        return new SystemuserRequest(contextPath.addSegment("createdby"));
    }

    @NavigationProperty(name="createdonbehalfby")
    @JsonIgnore
    public SystemuserRequest getCreatedonbehalfby() {
        return new SystemuserRequest(contextPath.addSegment("createdonbehalfby"));
    }

    @NavigationProperty(name="timezonedefinitionid")
    @JsonIgnore
    public TimezonedefinitionRequest getTimezonedefinitionid() {
        return new TimezonedefinitionRequest(contextPath.addSegment("timezonedefinitionid"));
    }

    @NavigationProperty(name="modifiedonbehalfby")
    @JsonIgnore
    public SystemuserRequest getModifiedonbehalfby() {
        return new SystemuserRequest(contextPath.addSegment("modifiedonbehalfby"));
    }

    @NavigationProperty(name="modifiedby")
    @JsonIgnore
    public SystemuserRequest getModifiedby() {
        return new SystemuserRequest(contextPath.addSegment("modifiedby"));
    }

    @JsonAnySetter
    private void setUnmappedField(String name, Object value) {
        if (unmappedFields == null) {
            unmappedFields = new UnmappedFields();
        }
        unmappedFields.put(name, value);
    }

    @Override
    @JsonIgnore
    public UnmappedFields getUnmappedFields() {
        return unmappedFields == null ? new UnmappedFields() : unmappedFields;
    }

    /**
     * Submits only changed fields for update and returns an 
     * immutable copy of {@code this} with changed fields reset.
     *
     * @return a copy of {@code this} with changed fields reset
     * @throws ClientException if HTTP response is not as expected
     */
    public Timezonerule patch() {
        RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
        Timezonerule _x = _copy();
        _x.changedFields = null;
        return _x;
    }

    /**
     * Submits all fields for update and returns an immutable copy of {@code this}
     * with changed fields reset (they were ignored anyway).
     *
     * @return a copy of {@code this} with changed fields reset
     * @throws ClientException if HTTP response is not as expected
     */
    public Timezonerule put() {
        RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
        Timezonerule _x = _copy();
        _x.changedFields = null;
        return _x;
    }

    private Timezonerule _copy() {
        Timezonerule _x = new Timezonerule();
        _x.contextPath = contextPath;
        _x.changedFields = changedFields;
        _x.unmappedFields = unmappedFields;
        _x.odataType = odataType;
        _x.daylighthour = daylighthour;
        _x.daylightminute = daylightminute;
        _x.standardsecond = standardsecond;
        _x.createdon = createdon;
        _x.standardmonth = standardmonth;
        _x.standardhour = standardhour;
        _x.bias = bias;
        _x._timezonedefinitionid_value = _timezonedefinitionid_value;
        _x.versionnumber = versionnumber;
        _x.modifiedon = modifiedon;
        _x.standardday = standardday;
        _x.daylightbias = daylightbias;
        _x.standardminute = standardminute;
        _x._createdonbehalfby_value = _createdonbehalfby_value;
        _x.timezoneruleid = timezoneruleid;
        _x.daylightyear = daylightyear;
        _x.standardbias = standardbias;
        _x.timezoneruleversionnumber = timezoneruleversionnumber;
        _x.standardyear = standardyear;
        _x._modifiedonbehalfby_value = _modifiedonbehalfby_value;
        _x._createdby_value = _createdby_value;
        _x.standarddayofweek = standarddayofweek;
        _x.daylightsecond = daylightsecond;
        _x.daylightmonth = daylightmonth;
        _x._organizationid_value = _organizationid_value;
        _x.daylightdayofweek = daylightdayofweek;
        _x._modifiedby_value = _modifiedby_value;
        _x.daylightday = daylightday;
        _x.effectivedatetime = effectivedatetime;
        return _x;
    }

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder();
        b.append("Timezonerule[");
        b.append("daylighthour=");
        b.append(this.daylighthour);
        b.append(", ");
        b.append("daylightminute=");
        b.append(this.daylightminute);
        b.append(", ");
        b.append("standardsecond=");
        b.append(this.standardsecond);
        b.append(", ");
        b.append("createdon=");
        b.append(this.createdon);
        b.append(", ");
        b.append("standardmonth=");
        b.append(this.standardmonth);
        b.append(", ");
        b.append("standardhour=");
        b.append(this.standardhour);
        b.append(", ");
        b.append("bias=");
        b.append(this.bias);
        b.append(", ");
        b.append("_timezonedefinitionid_value=");
        b.append(this._timezonedefinitionid_value);
        b.append(", ");
        b.append("versionnumber=");
        b.append(this.versionnumber);
        b.append(", ");
        b.append("modifiedon=");
        b.append(this.modifiedon);
        b.append(", ");
        b.append("standardday=");
        b.append(this.standardday);
        b.append(", ");
        b.append("daylightbias=");
        b.append(this.daylightbias);
        b.append(", ");
        b.append("standardminute=");
        b.append(this.standardminute);
        b.append(", ");
        b.append("_createdonbehalfby_value=");
        b.append(this._createdonbehalfby_value);
        b.append(", ");
        b.append("timezoneruleid=");
        b.append(this.timezoneruleid);
        b.append(", ");
        b.append("daylightyear=");
        b.append(this.daylightyear);
        b.append(", ");
        b.append("standardbias=");
        b.append(this.standardbias);
        b.append(", ");
        b.append("timezoneruleversionnumber=");
        b.append(this.timezoneruleversionnumber);
        b.append(", ");
        b.append("standardyear=");
        b.append(this.standardyear);
        b.append(", ");
        b.append("_modifiedonbehalfby_value=");
        b.append(this._modifiedonbehalfby_value);
        b.append(", ");
        b.append("_createdby_value=");
        b.append(this._createdby_value);
        b.append(", ");
        b.append("standarddayofweek=");
        b.append(this.standarddayofweek);
        b.append(", ");
        b.append("daylightsecond=");
        b.append(this.daylightsecond);
        b.append(", ");
        b.append("daylightmonth=");
        b.append(this.daylightmonth);
        b.append(", ");
        b.append("_organizationid_value=");
        b.append(this._organizationid_value);
        b.append(", ");
        b.append("daylightdayofweek=");
        b.append(this.daylightdayofweek);
        b.append(", ");
        b.append("_modifiedby_value=");
        b.append(this._modifiedby_value);
        b.append(", ");
        b.append("daylightday=");
        b.append(this.daylightday);
        b.append(", ");
        b.append("effectivedatetime=");
        b.append(this.effectivedatetime);
        b.append("]");
        b.append(",unmappedFields=");
        b.append(unmappedFields);
        b.append(",odataType=");
        b.append(odataType);
        return b.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy