microsoft.dynamics.crm.entity.EntityKeyMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-microsoft-dynamics Show documentation
Show all versions of odata-client-microsoft-dynamics Show documentation
Java client as template for Microsoft Dynamics organisation endpoints
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.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
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.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.Checks;
import com.github.davidmoten.odata.client.internal.EdmSchemaInfo;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFields;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import microsoft.dynamics.crm.complex.BooleanManagedProperty;
import microsoft.dynamics.crm.complex.Label;
import microsoft.dynamics.crm.enums.EntityKeyIndexStatus;
@JsonPropertyOrder({
"@odata.type",
"DisplayName",
"LogicalName",
"SchemaName",
"EntityLogicalName",
"KeyAttributes",
"IsCustomizable",
"IsManaged",
"IntroducedVersion",
"EntityKeyIndexStatus",
"AsyncJob",
"IsSynchronous",
"IsExportKey"})
@JsonInclude(Include.NON_NULL)
public class EntityKeyMetadata extends MetadataBase implements ODataEntityType {
@Override
public String odataTypeName() {
return "Microsoft.Dynamics.CRM.EntityKeyMetadata";
}
@JsonProperty("DisplayName")
protected Label displayName;
@JsonProperty("LogicalName")
protected String logicalName;
@JsonProperty("SchemaName")
protected String schemaName;
@JsonProperty("EntityLogicalName")
protected String entityLogicalName;
@JsonProperty("KeyAttributes")
protected List keyAttributes;
@JsonProperty("KeyAttributes@nextLink")
protected String keyAttributesNextLink;
@JsonProperty("IsCustomizable")
protected BooleanManagedProperty isCustomizable;
@JsonProperty("IsManaged")
protected Boolean isManaged;
@JsonProperty("IntroducedVersion")
protected String introducedVersion;
@JsonProperty("EntityKeyIndexStatus")
protected EntityKeyIndexStatus entityKeyIndexStatus;
@JsonProperty("AsyncJob")
protected String asyncJob;
@JsonProperty("IsSynchronous")
protected Boolean isSynchronous;
@JsonProperty("IsExportKey")
protected Boolean isExportKey;
protected EntityKeyMetadata() {
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 builderEntityKeyMetadata() {
return new Builder();
}
public static final class Builder {
private String metadataId;
private Boolean hasChanged;
private Label displayName;
private String logicalName;
private String schemaName;
private String entityLogicalName;
private List keyAttributes;
private String keyAttributesNextLink;
private BooleanManagedProperty isCustomizable;
private Boolean isManaged;
private String introducedVersion;
private EntityKeyIndexStatus entityKeyIndexStatus;
private String asyncJob;
private Boolean isSynchronous;
private Boolean isExportKey;
private ChangedFields changedFields = new ChangedFields();
Builder() {
// prevent instantiation
}
public Builder metadataId(String metadataId) {
this.metadataId = metadataId;
this.changedFields = changedFields.add("MetadataId");
return this;
}
public Builder hasChanged(Boolean hasChanged) {
this.hasChanged = hasChanged;
this.changedFields = changedFields.add("HasChanged");
return this;
}
public Builder displayName(Label displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("DisplayName");
return this;
}
public Builder logicalName(String logicalName) {
this.logicalName = logicalName;
this.changedFields = changedFields.add("LogicalName");
return this;
}
public Builder schemaName(String schemaName) {
this.schemaName = schemaName;
this.changedFields = changedFields.add("SchemaName");
return this;
}
public Builder entityLogicalName(String entityLogicalName) {
this.entityLogicalName = entityLogicalName;
this.changedFields = changedFields.add("EntityLogicalName");
return this;
}
public Builder keyAttributes(List keyAttributes) {
this.keyAttributes = keyAttributes;
this.changedFields = changedFields.add("KeyAttributes");
return this;
}
public Builder keyAttributes(String... keyAttributes) {
return keyAttributes(Arrays.asList(keyAttributes));
}
public Builder keyAttributesNextLink(String keyAttributesNextLink) {
this.keyAttributesNextLink = keyAttributesNextLink;
this.changedFields = changedFields.add("KeyAttributes");
return this;
}
public Builder isCustomizable(BooleanManagedProperty isCustomizable) {
this.isCustomizable = isCustomizable;
this.changedFields = changedFields.add("IsCustomizable");
return this;
}
public Builder isManaged(Boolean isManaged) {
this.isManaged = isManaged;
this.changedFields = changedFields.add("IsManaged");
return this;
}
public Builder introducedVersion(String introducedVersion) {
this.introducedVersion = introducedVersion;
this.changedFields = changedFields.add("IntroducedVersion");
return this;
}
public Builder entityKeyIndexStatus(EntityKeyIndexStatus entityKeyIndexStatus) {
this.entityKeyIndexStatus = entityKeyIndexStatus;
this.changedFields = changedFields.add("EntityKeyIndexStatus");
return this;
}
public Builder asyncJob(String asyncJob) {
this.asyncJob = asyncJob;
this.changedFields = changedFields.add("AsyncJob");
return this;
}
public Builder isSynchronous(Boolean isSynchronous) {
this.isSynchronous = isSynchronous;
this.changedFields = changedFields.add("IsSynchronous");
return this;
}
public Builder isExportKey(Boolean isExportKey) {
this.isExportKey = isExportKey;
this.changedFields = changedFields.add("IsExportKey");
return this;
}
public EntityKeyMetadata build() {
EntityKeyMetadata _x = new EntityKeyMetadata();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFields();
_x.odataType = "Microsoft.Dynamics.CRM.EntityKeyMetadata";
_x.metadataId = metadataId;
_x.hasChanged = hasChanged;
_x.displayName = displayName;
_x.logicalName = logicalName;
_x.schemaName = schemaName;
_x.entityLogicalName = entityLogicalName;
_x.keyAttributes = keyAttributes;
_x.keyAttributesNextLink = keyAttributesNextLink;
_x.isCustomizable = isCustomizable;
_x.isManaged = isManaged;
_x.introducedVersion = introducedVersion;
_x.entityKeyIndexStatus = entityKeyIndexStatus;
_x.asyncJob = asyncJob;
_x.isSynchronous = isSynchronous;
_x.isExportKey = isExportKey;
return _x;
}
}
@Override
@JsonIgnore
public ChangedFields getChangedFields() {
return changedFields;
}
@Override
public void postInject(boolean addKeysToContextPath) {
if (addKeysToContextPath && metadataId != null) {
contextPath = contextPath.clearQueries().addKeys(new NameValue(metadataId.toString()));
}
}
@Property(name="DisplayName")
@JsonIgnore
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy