microsoft.dynamics.crm.entity.AttributeMetadata 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.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.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFields;
import java.time.OffsetDateTime;
import java.util.Optional;
import microsoft.dynamics.crm.complex.AttributeRequiredLevelManagedProperty;
import microsoft.dynamics.crm.complex.AttributeTypeDisplayName;
import microsoft.dynamics.crm.complex.BooleanManagedProperty;
import microsoft.dynamics.crm.complex.Label;
import microsoft.dynamics.crm.enums.AttributeTypeCode;
@JsonPropertyOrder({
"@odata.type",
"AttributeOf",
"AttributeType",
"AttributeTypeName",
"ColumnNumber",
"Description",
"DisplayName",
"DeprecatedVersion",
"IntroducedVersion",
"EntityLogicalName",
"IsAuditEnabled",
"IsCustomAttribute",
"IsPrimaryId",
"IsValidODataAttribute",
"IsPrimaryName",
"IsValidForCreate",
"IsValidForRead",
"IsValidForUpdate",
"CanBeSecuredForRead",
"CanBeSecuredForCreate",
"CanBeSecuredForUpdate",
"IsSecured",
"IsRetrievable",
"IsFilterable",
"IsSearchable",
"IsManaged",
"IsGlobalFilterEnabled",
"IsSortableEnabled",
"LinkedAttributeId",
"LogicalName",
"IsCustomizable",
"IsRenameable",
"IsValidForAdvancedFind",
"IsValidForForm",
"IsRequiredForForm",
"IsValidForGrid",
"RequiredLevel",
"CanModifyAdditionalSettings",
"SchemaName",
"ExternalName",
"IsLogical",
"IsDataSourceSecret",
"InheritsFrom",
"CreatedOn",
"ModifiedOn",
"SourceType",
"AutoNumberFormat"})
@JsonInclude(Include.NON_NULL)
public class AttributeMetadata extends MetadataBase implements ODataEntityType {
@Override
public String odataTypeName() {
return "Microsoft.Dynamics.CRM.AttributeMetadata";
}
@JsonProperty("AttributeOf")
protected String attributeOf;
@JsonProperty("AttributeType")
protected AttributeTypeCode attributeType;
@JsonProperty("AttributeTypeName")
protected AttributeTypeDisplayName attributeTypeName;
@JsonProperty("ColumnNumber")
protected Integer columnNumber;
@JsonProperty("Description")
protected Label description;
@JsonProperty("DisplayName")
protected Label displayName;
@JsonProperty("DeprecatedVersion")
protected String deprecatedVersion;
@JsonProperty("IntroducedVersion")
protected String introducedVersion;
@JsonProperty("EntityLogicalName")
protected String entityLogicalName;
@JsonProperty("IsAuditEnabled")
protected BooleanManagedProperty isAuditEnabled;
@JsonProperty("IsCustomAttribute")
protected Boolean isCustomAttribute;
@JsonProperty("IsPrimaryId")
protected Boolean isPrimaryId;
@JsonProperty("IsValidODataAttribute")
protected Boolean isValidODataAttribute;
@JsonProperty("IsPrimaryName")
protected Boolean isPrimaryName;
@JsonProperty("IsValidForCreate")
protected Boolean isValidForCreate;
@JsonProperty("IsValidForRead")
protected Boolean isValidForRead;
@JsonProperty("IsValidForUpdate")
protected Boolean isValidForUpdate;
@JsonProperty("CanBeSecuredForRead")
protected Boolean canBeSecuredForRead;
@JsonProperty("CanBeSecuredForCreate")
protected Boolean canBeSecuredForCreate;
@JsonProperty("CanBeSecuredForUpdate")
protected Boolean canBeSecuredForUpdate;
@JsonProperty("IsSecured")
protected Boolean isSecured;
@JsonProperty("IsRetrievable")
protected Boolean isRetrievable;
@JsonProperty("IsFilterable")
protected Boolean isFilterable;
@JsonProperty("IsSearchable")
protected Boolean isSearchable;
@JsonProperty("IsManaged")
protected Boolean isManaged;
@JsonProperty("IsGlobalFilterEnabled")
protected BooleanManagedProperty isGlobalFilterEnabled;
@JsonProperty("IsSortableEnabled")
protected BooleanManagedProperty isSortableEnabled;
@JsonProperty("LinkedAttributeId")
protected String linkedAttributeId;
@JsonProperty("LogicalName")
protected String logicalName;
@JsonProperty("IsCustomizable")
protected BooleanManagedProperty isCustomizable;
@JsonProperty("IsRenameable")
protected BooleanManagedProperty isRenameable;
@JsonProperty("IsValidForAdvancedFind")
protected BooleanManagedProperty isValidForAdvancedFind;
@JsonProperty("IsValidForForm")
protected Boolean isValidForForm;
@JsonProperty("IsRequiredForForm")
protected Boolean isRequiredForForm;
@JsonProperty("IsValidForGrid")
protected Boolean isValidForGrid;
@JsonProperty("RequiredLevel")
protected AttributeRequiredLevelManagedProperty requiredLevel;
@JsonProperty("CanModifyAdditionalSettings")
protected BooleanManagedProperty canModifyAdditionalSettings;
@JsonProperty("SchemaName")
protected String schemaName;
@JsonProperty("ExternalName")
protected String externalName;
@JsonProperty("IsLogical")
protected Boolean isLogical;
@JsonProperty("IsDataSourceSecret")
protected Boolean isDataSourceSecret;
@JsonProperty("InheritsFrom")
protected String inheritsFrom;
@JsonProperty("CreatedOn")
protected OffsetDateTime createdOn;
@JsonProperty("ModifiedOn")
protected OffsetDateTime modifiedOn;
@JsonProperty("SourceType")
protected Integer sourceType;
@JsonProperty("AutoNumberFormat")
protected String autoNumberFormat;
protected AttributeMetadata() {
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 builderAttributeMetadata() {
return new Builder();
}
public static final class Builder {
private String metadataId;
private Boolean hasChanged;
private String attributeOf;
private AttributeTypeCode attributeType;
private AttributeTypeDisplayName attributeTypeName;
private Integer columnNumber;
private Label description;
private Label displayName;
private String deprecatedVersion;
private String introducedVersion;
private String entityLogicalName;
private BooleanManagedProperty isAuditEnabled;
private Boolean isCustomAttribute;
private Boolean isPrimaryId;
private Boolean isValidODataAttribute;
private Boolean isPrimaryName;
private Boolean isValidForCreate;
private Boolean isValidForRead;
private Boolean isValidForUpdate;
private Boolean canBeSecuredForRead;
private Boolean canBeSecuredForCreate;
private Boolean canBeSecuredForUpdate;
private Boolean isSecured;
private Boolean isRetrievable;
private Boolean isFilterable;
private Boolean isSearchable;
private Boolean isManaged;
private BooleanManagedProperty isGlobalFilterEnabled;
private BooleanManagedProperty isSortableEnabled;
private String linkedAttributeId;
private String logicalName;
private BooleanManagedProperty isCustomizable;
private BooleanManagedProperty isRenameable;
private BooleanManagedProperty isValidForAdvancedFind;
private Boolean isValidForForm;
private Boolean isRequiredForForm;
private Boolean isValidForGrid;
private AttributeRequiredLevelManagedProperty requiredLevel;
private BooleanManagedProperty canModifyAdditionalSettings;
private String schemaName;
private String externalName;
private Boolean isLogical;
private Boolean isDataSourceSecret;
private String inheritsFrom;
private OffsetDateTime createdOn;
private OffsetDateTime modifiedOn;
private Integer sourceType;
private String autoNumberFormat;
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 attributeOf(String attributeOf) {
this.attributeOf = attributeOf;
this.changedFields = changedFields.add("AttributeOf");
return this;
}
public Builder attributeType(AttributeTypeCode attributeType) {
this.attributeType = attributeType;
this.changedFields = changedFields.add("AttributeType");
return this;
}
public Builder attributeTypeName(AttributeTypeDisplayName attributeTypeName) {
this.attributeTypeName = attributeTypeName;
this.changedFields = changedFields.add("AttributeTypeName");
return this;
}
public Builder columnNumber(Integer columnNumber) {
this.columnNumber = columnNumber;
this.changedFields = changedFields.add("ColumnNumber");
return this;
}
public Builder description(Label description) {
this.description = description;
this.changedFields = changedFields.add("Description");
return this;
}
public Builder displayName(Label displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("DisplayName");
return this;
}
public Builder deprecatedVersion(String deprecatedVersion) {
this.deprecatedVersion = deprecatedVersion;
this.changedFields = changedFields.add("DeprecatedVersion");
return this;
}
public Builder introducedVersion(String introducedVersion) {
this.introducedVersion = introducedVersion;
this.changedFields = changedFields.add("IntroducedVersion");
return this;
}
public Builder entityLogicalName(String entityLogicalName) {
this.entityLogicalName = entityLogicalName;
this.changedFields = changedFields.add("EntityLogicalName");
return this;
}
public Builder isAuditEnabled(BooleanManagedProperty isAuditEnabled) {
this.isAuditEnabled = isAuditEnabled;
this.changedFields = changedFields.add("IsAuditEnabled");
return this;
}
public Builder isCustomAttribute(Boolean isCustomAttribute) {
this.isCustomAttribute = isCustomAttribute;
this.changedFields = changedFields.add("IsCustomAttribute");
return this;
}
public Builder isPrimaryId(Boolean isPrimaryId) {
this.isPrimaryId = isPrimaryId;
this.changedFields = changedFields.add("IsPrimaryId");
return this;
}
public Builder isValidODataAttribute(Boolean isValidODataAttribute) {
this.isValidODataAttribute = isValidODataAttribute;
this.changedFields = changedFields.add("IsValidODataAttribute");
return this;
}
public Builder isPrimaryName(Boolean isPrimaryName) {
this.isPrimaryName = isPrimaryName;
this.changedFields = changedFields.add("IsPrimaryName");
return this;
}
public Builder isValidForCreate(Boolean isValidForCreate) {
this.isValidForCreate = isValidForCreate;
this.changedFields = changedFields.add("IsValidForCreate");
return this;
}
public Builder isValidForRead(Boolean isValidForRead) {
this.isValidForRead = isValidForRead;
this.changedFields = changedFields.add("IsValidForRead");
return this;
}
public Builder isValidForUpdate(Boolean isValidForUpdate) {
this.isValidForUpdate = isValidForUpdate;
this.changedFields = changedFields.add("IsValidForUpdate");
return this;
}
public Builder canBeSecuredForRead(Boolean canBeSecuredForRead) {
this.canBeSecuredForRead = canBeSecuredForRead;
this.changedFields = changedFields.add("CanBeSecuredForRead");
return this;
}
public Builder canBeSecuredForCreate(Boolean canBeSecuredForCreate) {
this.canBeSecuredForCreate = canBeSecuredForCreate;
this.changedFields = changedFields.add("CanBeSecuredForCreate");
return this;
}
public Builder canBeSecuredForUpdate(Boolean canBeSecuredForUpdate) {
this.canBeSecuredForUpdate = canBeSecuredForUpdate;
this.changedFields = changedFields.add("CanBeSecuredForUpdate");
return this;
}
public Builder isSecured(Boolean isSecured) {
this.isSecured = isSecured;
this.changedFields = changedFields.add("IsSecured");
return this;
}
public Builder isRetrievable(Boolean isRetrievable) {
this.isRetrievable = isRetrievable;
this.changedFields = changedFields.add("IsRetrievable");
return this;
}
public Builder isFilterable(Boolean isFilterable) {
this.isFilterable = isFilterable;
this.changedFields = changedFields.add("IsFilterable");
return this;
}
public Builder isSearchable(Boolean isSearchable) {
this.isSearchable = isSearchable;
this.changedFields = changedFields.add("IsSearchable");
return this;
}
public Builder isManaged(Boolean isManaged) {
this.isManaged = isManaged;
this.changedFields = changedFields.add("IsManaged");
return this;
}
public Builder isGlobalFilterEnabled(BooleanManagedProperty isGlobalFilterEnabled) {
this.isGlobalFilterEnabled = isGlobalFilterEnabled;
this.changedFields = changedFields.add("IsGlobalFilterEnabled");
return this;
}
public Builder isSortableEnabled(BooleanManagedProperty isSortableEnabled) {
this.isSortableEnabled = isSortableEnabled;
this.changedFields = changedFields.add("IsSortableEnabled");
return this;
}
public Builder linkedAttributeId(String linkedAttributeId) {
this.linkedAttributeId = linkedAttributeId;
this.changedFields = changedFields.add("LinkedAttributeId");
return this;
}
public Builder logicalName(String logicalName) {
this.logicalName = logicalName;
this.changedFields = changedFields.add("LogicalName");
return this;
}
public Builder isCustomizable(BooleanManagedProperty isCustomizable) {
this.isCustomizable = isCustomizable;
this.changedFields = changedFields.add("IsCustomizable");
return this;
}
public Builder isRenameable(BooleanManagedProperty isRenameable) {
this.isRenameable = isRenameable;
this.changedFields = changedFields.add("IsRenameable");
return this;
}
public Builder isValidForAdvancedFind(BooleanManagedProperty isValidForAdvancedFind) {
this.isValidForAdvancedFind = isValidForAdvancedFind;
this.changedFields = changedFields.add("IsValidForAdvancedFind");
return this;
}
public Builder isValidForForm(Boolean isValidForForm) {
this.isValidForForm = isValidForForm;
this.changedFields = changedFields.add("IsValidForForm");
return this;
}
public Builder isRequiredForForm(Boolean isRequiredForForm) {
this.isRequiredForForm = isRequiredForForm;
this.changedFields = changedFields.add("IsRequiredForForm");
return this;
}
public Builder isValidForGrid(Boolean isValidForGrid) {
this.isValidForGrid = isValidForGrid;
this.changedFields = changedFields.add("IsValidForGrid");
return this;
}
public Builder requiredLevel(AttributeRequiredLevelManagedProperty requiredLevel) {
this.requiredLevel = requiredLevel;
this.changedFields = changedFields.add("RequiredLevel");
return this;
}
public Builder canModifyAdditionalSettings(BooleanManagedProperty canModifyAdditionalSettings) {
this.canModifyAdditionalSettings = canModifyAdditionalSettings;
this.changedFields = changedFields.add("CanModifyAdditionalSettings");
return this;
}
public Builder schemaName(String schemaName) {
this.schemaName = schemaName;
this.changedFields = changedFields.add("SchemaName");
return this;
}
public Builder externalName(String externalName) {
this.externalName = externalName;
this.changedFields = changedFields.add("ExternalName");
return this;
}
public Builder isLogical(Boolean isLogical) {
this.isLogical = isLogical;
this.changedFields = changedFields.add("IsLogical");
return this;
}
public Builder isDataSourceSecret(Boolean isDataSourceSecret) {
this.isDataSourceSecret = isDataSourceSecret;
this.changedFields = changedFields.add("IsDataSourceSecret");
return this;
}
public Builder inheritsFrom(String inheritsFrom) {
this.inheritsFrom = inheritsFrom;
this.changedFields = changedFields.add("InheritsFrom");
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 sourceType(Integer sourceType) {
this.sourceType = sourceType;
this.changedFields = changedFields.add("SourceType");
return this;
}
public Builder autoNumberFormat(String autoNumberFormat) {
this.autoNumberFormat = autoNumberFormat;
this.changedFields = changedFields.add("AutoNumberFormat");
return this;
}
public AttributeMetadata build() {
AttributeMetadata _x = new AttributeMetadata();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFields();
_x.odataType = "Microsoft.Dynamics.CRM.AttributeMetadata";
_x.metadataId = metadataId;
_x.hasChanged = hasChanged;
_x.attributeOf = attributeOf;
_x.attributeType = attributeType;
_x.attributeTypeName = attributeTypeName;
_x.columnNumber = columnNumber;
_x.description = description;
_x.displayName = displayName;
_x.deprecatedVersion = deprecatedVersion;
_x.introducedVersion = introducedVersion;
_x.entityLogicalName = entityLogicalName;
_x.isAuditEnabled = isAuditEnabled;
_x.isCustomAttribute = isCustomAttribute;
_x.isPrimaryId = isPrimaryId;
_x.isValidODataAttribute = isValidODataAttribute;
_x.isPrimaryName = isPrimaryName;
_x.isValidForCreate = isValidForCreate;
_x.isValidForRead = isValidForRead;
_x.isValidForUpdate = isValidForUpdate;
_x.canBeSecuredForRead = canBeSecuredForRead;
_x.canBeSecuredForCreate = canBeSecuredForCreate;
_x.canBeSecuredForUpdate = canBeSecuredForUpdate;
_x.isSecured = isSecured;
_x.isRetrievable = isRetrievable;
_x.isFilterable = isFilterable;
_x.isSearchable = isSearchable;
_x.isManaged = isManaged;
_x.isGlobalFilterEnabled = isGlobalFilterEnabled;
_x.isSortableEnabled = isSortableEnabled;
_x.linkedAttributeId = linkedAttributeId;
_x.logicalName = logicalName;
_x.isCustomizable = isCustomizable;
_x.isRenameable = isRenameable;
_x.isValidForAdvancedFind = isValidForAdvancedFind;
_x.isValidForForm = isValidForForm;
_x.isRequiredForForm = isRequiredForForm;
_x.isValidForGrid = isValidForGrid;
_x.requiredLevel = requiredLevel;
_x.canModifyAdditionalSettings = canModifyAdditionalSettings;
_x.schemaName = schemaName;
_x.externalName = externalName;
_x.isLogical = isLogical;
_x.isDataSourceSecret = isDataSourceSecret;
_x.inheritsFrom = inheritsFrom;
_x.createdOn = createdOn;
_x.modifiedOn = modifiedOn;
_x.sourceType = sourceType;
_x.autoNumberFormat = autoNumberFormat;
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="AttributeOf")
@JsonIgnore
public Optional getAttributeOf() {
return Optional.ofNullable(attributeOf);
}
public AttributeMetadata withAttributeOf(String attributeOf) {
Checks.checkIsAscii(attributeOf);
AttributeMetadata _x = _copy();
_x.changedFields = changedFields.add("AttributeOf");
_x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.AttributeMetadata");
_x.attributeOf = attributeOf;
return _x;
}
@Property(name="AttributeType")
@JsonIgnore
public Optional getAttributeType() {
return Optional.ofNullable(attributeType);
}
public AttributeMetadata withAttributeType(AttributeTypeCode attributeType) {
AttributeMetadata _x = _copy();
_x.changedFields = changedFields.add("AttributeType");
_x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.AttributeMetadata");
_x.attributeType = attributeType;
return _x;
}
@Property(name="AttributeTypeName")
@JsonIgnore
public Optional getAttributeTypeName() {
return Optional.ofNullable(attributeTypeName);
}
public AttributeMetadata withAttributeTypeName(AttributeTypeDisplayName attributeTypeName) {
AttributeMetadata _x = _copy();
_x.changedFields = changedFields.add("AttributeTypeName");
_x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.AttributeMetadata");
_x.attributeTypeName = attributeTypeName;
return _x;
}
@Property(name="ColumnNumber")
@JsonIgnore
public Optional getColumnNumber() {
return Optional.ofNullable(columnNumber);
}
public AttributeMetadata withColumnNumber(Integer columnNumber) {
AttributeMetadata _x = _copy();
_x.changedFields = changedFields.add("ColumnNumber");
_x.odataType = Util.nvl(odataType, "Microsoft.Dynamics.CRM.AttributeMetadata");
_x.columnNumber = columnNumber;
return _x;
}
@Property(name="Description")
@JsonIgnore
public Optional
© 2015 - 2025 Weber Informatics LLC | Privacy Policy