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

microsoft.dynamics.crm.entity.Msdyn_richtextfile 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.Checks;
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.collection.request.AsyncoperationCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.BulkdeletefailureCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.MailboxtrackingfolderCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.PrincipalobjectattributeaccessCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.ProcesssessionCollectionRequest;
import microsoft.dynamics.crm.entity.collection.request.SyncerrorCollectionRequest;
import microsoft.dynamics.crm.entity.request.BusinessunitRequest;
import microsoft.dynamics.crm.entity.request.PrincipalRequest;
import microsoft.dynamics.crm.entity.request.SystemuserRequest;
import microsoft.dynamics.crm.entity.request.TeamRequest;

@JsonPropertyOrder({
    "@odata.type", 
    "msdyn_parentid", 
    "_ownerid_value", 
    "versionnumber", 
    "_owningteam_value", 
    "msdyn_parententityname", 
    "timezoneruleversionnumber", 
    "_modifiedby_value", 
    "msdyn_imageblob_url", 
    "overriddencreatedon", 
    "statecode", 
    "msdyn_parententity_fieldname", 
    "statuscode", 
    "msdyn_imageblobid", 
    "msdyn_imageblob_timestamp", 
    "_owningbusinessunit_value", 
    "msdyn_richtextfileid", 
    "createdon", 
    "modifiedon", 
    "importsequencenumber", 
    "_createdby_value", 
    "utcconversiontimezonecode", 
    "_owninguser_value", 
    "msdyn_name", 
    "msdyn_imageblob", 
    "_modifiedonbehalfby_value", 
    "_createdonbehalfby_value"})
@JsonInclude(Include.NON_NULL)
public class Msdyn_richtextfile extends Crmbaseentity implements ODataEntityType {

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

    @JsonProperty("msdyn_parentid")
    protected String msdyn_parentid;

    @JsonProperty("_ownerid_value")
    protected String _ownerid_value;

    @JsonProperty("versionnumber")
    protected Long versionnumber;

    @JsonProperty("_owningteam_value")
    protected String _owningteam_value;

    @JsonProperty("msdyn_parententityname")
    protected String msdyn_parententityname;

    @JsonProperty("timezoneruleversionnumber")
    protected Integer timezoneruleversionnumber;

    @JsonProperty("_modifiedby_value")
    protected String _modifiedby_value;

    @JsonProperty("msdyn_imageblob_url")
    protected String msdyn_imageblob_url;

    @JsonProperty("overriddencreatedon")
    protected OffsetDateTime overriddencreatedon;

    @JsonProperty("statecode")
    protected Integer statecode;

    @JsonProperty("msdyn_parententity_fieldname")
    protected String msdyn_parententity_fieldname;

    @JsonProperty("statuscode")
    protected Integer statuscode;

    @JsonProperty("msdyn_imageblobid")
    protected String msdyn_imageblobid;

    @JsonProperty("msdyn_imageblob_timestamp")
    protected Long msdyn_imageblob_timestamp;

    @JsonProperty("_owningbusinessunit_value")
    protected String _owningbusinessunit_value;

    @JsonProperty("msdyn_richtextfileid")
    protected String msdyn_richtextfileid;

    @JsonProperty("createdon")
    protected OffsetDateTime createdon;

    @JsonProperty("modifiedon")
    protected OffsetDateTime modifiedon;

    @JsonProperty("importsequencenumber")
    protected Integer importsequencenumber;

    @JsonProperty("_createdby_value")
    protected String _createdby_value;

    @JsonProperty("utcconversiontimezonecode")
    protected Integer utcconversiontimezonecode;

    @JsonProperty("_owninguser_value")
    protected String _owninguser_value;

    @JsonProperty("msdyn_name")
    protected String msdyn_name;

    @JsonProperty("msdyn_imageblob")
    protected byte[] msdyn_imageblob;

    @JsonProperty("_modifiedonbehalfby_value")
    protected String _modifiedonbehalfby_value;

    @JsonProperty("_createdonbehalfby_value")
    protected String _createdonbehalfby_value;

    protected Msdyn_richtextfile() {
        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 builderMsdyn_richtextfile() {
        return new Builder();
    }

    public static final class Builder {
        private String msdyn_parentid;
        private String _ownerid_value;
        private Long versionnumber;
        private String _owningteam_value;
        private String msdyn_parententityname;
        private Integer timezoneruleversionnumber;
        private String _modifiedby_value;
        private String msdyn_imageblob_url;
        private OffsetDateTime overriddencreatedon;
        private Integer statecode;
        private String msdyn_parententity_fieldname;
        private Integer statuscode;
        private String msdyn_imageblobid;
        private Long msdyn_imageblob_timestamp;
        private String _owningbusinessunit_value;
        private String msdyn_richtextfileid;
        private OffsetDateTime createdon;
        private OffsetDateTime modifiedon;
        private Integer importsequencenumber;
        private String _createdby_value;
        private Integer utcconversiontimezonecode;
        private String _owninguser_value;
        private String msdyn_name;
        private byte[] msdyn_imageblob;
        private String _modifiedonbehalfby_value;
        private String _createdonbehalfby_value;
        private ChangedFields changedFields = new ChangedFields();

        Builder() {
            // prevent instantiation
        }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        public Builder msdyn_imageblob(byte[] msdyn_imageblob) {
            this.msdyn_imageblob = msdyn_imageblob;
            this.changedFields = changedFields.add("msdyn_imageblob");
            return this;
        }

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

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

        public Msdyn_richtextfile build() {
            Msdyn_richtextfile _x = new Msdyn_richtextfile();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFields();
            _x.odataType = "Microsoft.Dynamics.CRM.msdyn_richtextfile";
            _x.msdyn_parentid = msdyn_parentid;
            _x._ownerid_value = _ownerid_value;
            _x.versionnumber = versionnumber;
            _x._owningteam_value = _owningteam_value;
            _x.msdyn_parententityname = msdyn_parententityname;
            _x.timezoneruleversionnumber = timezoneruleversionnumber;
            _x._modifiedby_value = _modifiedby_value;
            _x.msdyn_imageblob_url = msdyn_imageblob_url;
            _x.overriddencreatedon = overriddencreatedon;
            _x.statecode = statecode;
            _x.msdyn_parententity_fieldname = msdyn_parententity_fieldname;
            _x.statuscode = statuscode;
            _x.msdyn_imageblobid = msdyn_imageblobid;
            _x.msdyn_imageblob_timestamp = msdyn_imageblob_timestamp;
            _x._owningbusinessunit_value = _owningbusinessunit_value;
            _x.msdyn_richtextfileid = msdyn_richtextfileid;
            _x.createdon = createdon;
            _x.modifiedon = modifiedon;
            _x.importsequencenumber = importsequencenumber;
            _x._createdby_value = _createdby_value;
            _x.utcconversiontimezonecode = utcconversiontimezonecode;
            _x._owninguser_value = _owninguser_value;
            _x.msdyn_name = msdyn_name;
            _x.msdyn_imageblob = msdyn_imageblob;
            _x._modifiedonbehalfby_value = _modifiedonbehalfby_value;
            _x._createdonbehalfby_value = _createdonbehalfby_value;
            return _x;
        }
    }

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

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

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

    public Msdyn_richtextfile withMsdyn_parentid(String msdyn_parentid) {
        Checks.checkIsAscii(msdyn_parentid);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_parentid");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_parentid = msdyn_parentid;
        return _x;
    }

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

    public Msdyn_richtextfile with_ownerid_value(String _ownerid_value) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("_ownerid_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x._ownerid_value = _ownerid_value;
        return _x;
    }

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

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

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

    public Msdyn_richtextfile with_owningteam_value(String _owningteam_value) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("_owningteam_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x._owningteam_value = _owningteam_value;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_parententityname(String msdyn_parententityname) {
        Checks.checkIsAscii(msdyn_parententityname);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_parententityname");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_parententityname = msdyn_parententityname;
        return _x;
    }

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

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

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

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

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

    public Msdyn_richtextfile withMsdyn_imageblob_url(String msdyn_imageblob_url) {
        Checks.checkIsAscii(msdyn_imageblob_url);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_imageblob_url");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_imageblob_url = msdyn_imageblob_url;
        return _x;
    }

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

    public Msdyn_richtextfile withOverriddencreatedon(OffsetDateTime overriddencreatedon) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("overriddencreatedon");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.overriddencreatedon = overriddencreatedon;
        return _x;
    }

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

    public Msdyn_richtextfile withStatecode(Integer statecode) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("statecode");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.statecode = statecode;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_parententity_fieldname(String msdyn_parententity_fieldname) {
        Checks.checkIsAscii(msdyn_parententity_fieldname);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_parententity_fieldname");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_parententity_fieldname = msdyn_parententity_fieldname;
        return _x;
    }

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

    public Msdyn_richtextfile withStatuscode(Integer statuscode) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("statuscode");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.statuscode = statuscode;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_imageblobid(String msdyn_imageblobid) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_imageblobid");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_imageblobid = msdyn_imageblobid;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_imageblob_timestamp(Long msdyn_imageblob_timestamp) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_imageblob_timestamp");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_imageblob_timestamp = msdyn_imageblob_timestamp;
        return _x;
    }

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

    public Msdyn_richtextfile with_owningbusinessunit_value(String _owningbusinessunit_value) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("_owningbusinessunit_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x._owningbusinessunit_value = _owningbusinessunit_value;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_richtextfileid(String msdyn_richtextfileid) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_richtextfileid");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_richtextfileid = msdyn_richtextfileid;
        return _x;
    }

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

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

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

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

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

    public Msdyn_richtextfile withImportsequencenumber(Integer importsequencenumber) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("importsequencenumber");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.importsequencenumber = importsequencenumber;
        return _x;
    }

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

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

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

    public Msdyn_richtextfile withUtcconversiontimezonecode(Integer utcconversiontimezonecode) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("utcconversiontimezonecode");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.utcconversiontimezonecode = utcconversiontimezonecode;
        return _x;
    }

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

    public Msdyn_richtextfile with_owninguser_value(String _owninguser_value) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("_owninguser_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x._owninguser_value = _owninguser_value;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_name(String msdyn_name) {
        Checks.checkIsAscii(msdyn_name);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_name");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_name = msdyn_name;
        return _x;
    }

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

    public Msdyn_richtextfile withMsdyn_imageblob(byte[] msdyn_imageblob) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("msdyn_imageblob");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x.msdyn_imageblob = msdyn_imageblob;
        return _x;
    }

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

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

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

    public Msdyn_richtextfile with_createdonbehalfby_value(String _createdonbehalfby_value) {
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = changedFields.add("_createdonbehalfby_value");
        _x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.msdyn_richtextfile");
        _x._createdonbehalfby_value = _createdonbehalfby_value;
        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="modifiedby")
    @JsonIgnore
    public SystemuserRequest getModifiedby() {
        return new SystemuserRequest(contextPath.addSegment("modifiedby"));
    }

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

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

    @NavigationProperty(name="owningteam")
    @JsonIgnore
    public TeamRequest getOwningteam() {
        return new TeamRequest(contextPath.addSegment("owningteam"));
    }

    @NavigationProperty(name="ownerid")
    @JsonIgnore
    public PrincipalRequest getOwnerid() {
        return new PrincipalRequest(contextPath.addSegment("ownerid"));
    }

    @NavigationProperty(name="owningbusinessunit")
    @JsonIgnore
    public BusinessunitRequest getOwningbusinessunit() {
        return new BusinessunitRequest(contextPath.addSegment("owningbusinessunit"));
    }

    @NavigationProperty(name="msdyn_richtextfile_SyncErrors")
    @JsonIgnore
    public SyncerrorCollectionRequest getMsdyn_richtextfile_SyncErrors() {
        return new SyncerrorCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_SyncErrors"));
    }

    @NavigationProperty(name="msdyn_richtextfile_AsyncOperations")
    @JsonIgnore
    public AsyncoperationCollectionRequest getMsdyn_richtextfile_AsyncOperations() {
        return new AsyncoperationCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_AsyncOperations"));
    }

    @NavigationProperty(name="msdyn_richtextfile_MailboxTrackingFolders")
    @JsonIgnore
    public MailboxtrackingfolderCollectionRequest getMsdyn_richtextfile_MailboxTrackingFolders() {
        return new MailboxtrackingfolderCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_MailboxTrackingFolders"));
    }

    @NavigationProperty(name="msdyn_richtextfile_ProcessSession")
    @JsonIgnore
    public ProcesssessionCollectionRequest getMsdyn_richtextfile_ProcessSession() {
        return new ProcesssessionCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_ProcessSession"));
    }

    @NavigationProperty(name="msdyn_richtextfile_BulkDeleteFailures")
    @JsonIgnore
    public BulkdeletefailureCollectionRequest getMsdyn_richtextfile_BulkDeleteFailures() {
        return new BulkdeletefailureCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_BulkDeleteFailures"));
    }

    @NavigationProperty(name="msdyn_richtextfile_PrincipalObjectAttributeAccesses")
    @JsonIgnore
    public PrincipalobjectattributeaccessCollectionRequest getMsdyn_richtextfile_PrincipalObjectAttributeAccesses() {
        return new PrincipalobjectattributeaccessCollectionRequest(
                        contextPath.addSegment("msdyn_richtextfile_PrincipalObjectAttributeAccesses"));
    }

    @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 Msdyn_richtextfile patch() {
        RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
        Msdyn_richtextfile _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 Msdyn_richtextfile put() {
        RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
        Msdyn_richtextfile _x = _copy();
        _x.changedFields = null;
        return _x;
    }

    private Msdyn_richtextfile _copy() {
        Msdyn_richtextfile _x = new Msdyn_richtextfile();
        _x.contextPath = contextPath;
        _x.changedFields = changedFields;
        _x.unmappedFields = unmappedFields;
        _x.odataType = odataType;
        _x.msdyn_parentid = msdyn_parentid;
        _x._ownerid_value = _ownerid_value;
        _x.versionnumber = versionnumber;
        _x._owningteam_value = _owningteam_value;
        _x.msdyn_parententityname = msdyn_parententityname;
        _x.timezoneruleversionnumber = timezoneruleversionnumber;
        _x._modifiedby_value = _modifiedby_value;
        _x.msdyn_imageblob_url = msdyn_imageblob_url;
        _x.overriddencreatedon = overriddencreatedon;
        _x.statecode = statecode;
        _x.msdyn_parententity_fieldname = msdyn_parententity_fieldname;
        _x.statuscode = statuscode;
        _x.msdyn_imageblobid = msdyn_imageblobid;
        _x.msdyn_imageblob_timestamp = msdyn_imageblob_timestamp;
        _x._owningbusinessunit_value = _owningbusinessunit_value;
        _x.msdyn_richtextfileid = msdyn_richtextfileid;
        _x.createdon = createdon;
        _x.modifiedon = modifiedon;
        _x.importsequencenumber = importsequencenumber;
        _x._createdby_value = _createdby_value;
        _x.utcconversiontimezonecode = utcconversiontimezonecode;
        _x._owninguser_value = _owninguser_value;
        _x.msdyn_name = msdyn_name;
        _x.msdyn_imageblob = msdyn_imageblob;
        _x._modifiedonbehalfby_value = _modifiedonbehalfby_value;
        _x._createdonbehalfby_value = _createdonbehalfby_value;
        return _x;
    }

    @Override
    public String toString() {
        StringBuilder b = new StringBuilder();
        b.append("Msdyn_richtextfile[");
        b.append("msdyn_parentid=");
        b.append(this.msdyn_parentid);
        b.append(", ");
        b.append("_ownerid_value=");
        b.append(this._ownerid_value);
        b.append(", ");
        b.append("versionnumber=");
        b.append(this.versionnumber);
        b.append(", ");
        b.append("_owningteam_value=");
        b.append(this._owningteam_value);
        b.append(", ");
        b.append("msdyn_parententityname=");
        b.append(this.msdyn_parententityname);
        b.append(", ");
        b.append("timezoneruleversionnumber=");
        b.append(this.timezoneruleversionnumber);
        b.append(", ");
        b.append("_modifiedby_value=");
        b.append(this._modifiedby_value);
        b.append(", ");
        b.append("msdyn_imageblob_url=");
        b.append(this.msdyn_imageblob_url);
        b.append(", ");
        b.append("overriddencreatedon=");
        b.append(this.overriddencreatedon);
        b.append(", ");
        b.append("statecode=");
        b.append(this.statecode);
        b.append(", ");
        b.append("msdyn_parententity_fieldname=");
        b.append(this.msdyn_parententity_fieldname);
        b.append(", ");
        b.append("statuscode=");
        b.append(this.statuscode);
        b.append(", ");
        b.append("msdyn_imageblobid=");
        b.append(this.msdyn_imageblobid);
        b.append(", ");
        b.append("msdyn_imageblob_timestamp=");
        b.append(this.msdyn_imageblob_timestamp);
        b.append(", ");
        b.append("_owningbusinessunit_value=");
        b.append(this._owningbusinessunit_value);
        b.append(", ");
        b.append("msdyn_richtextfileid=");
        b.append(this.msdyn_richtextfileid);
        b.append(", ");
        b.append("createdon=");
        b.append(this.createdon);
        b.append(", ");
        b.append("modifiedon=");
        b.append(this.modifiedon);
        b.append(", ");
        b.append("importsequencenumber=");
        b.append(this.importsequencenumber);
        b.append(", ");
        b.append("_createdby_value=");
        b.append(this._createdby_value);
        b.append(", ");
        b.append("utcconversiontimezonecode=");
        b.append(this.utcconversiontimezonecode);
        b.append(", ");
        b.append("_owninguser_value=");
        b.append(this._owninguser_value);
        b.append(", ");
        b.append("msdyn_name=");
        b.append(this.msdyn_name);
        b.append(", ");
        b.append("msdyn_imageblob=");
        b.append(this.msdyn_imageblob);
        b.append(", ");
        b.append("_modifiedonbehalfby_value=");
        b.append(this._modifiedonbehalfby_value);
        b.append(", ");
        b.append("_createdonbehalfby_value=");
        b.append(this._createdonbehalfby_value);
        b.append("]");
        b.append(",unmappedFields=");
        b.append(unmappedFields);
        b.append(",odataType=");
        b.append(odataType);
        return b.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy