fixed list of required fields for entities
This commit is contained in:
parent
1d3a9a25b3
commit
03b2399c44
@ -35,9 +35,9 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
|
||||
|
||||
@NoXss
|
||||
@Length(fieldName = "title")
|
||||
@ApiModelProperty(position = 3, value = "Title of the customer", example = "Company A")
|
||||
@ApiModelProperty(position = 3, required = true, value = "Title of the customer", example = "Company A")
|
||||
private String title;
|
||||
@ApiModelProperty(position = 5, required = true, value = "JSON object with Tenant Id")
|
||||
@ApiModelProperty(position = 5, value = "JSON object with Tenant Id")
|
||||
private TenantId tenantId;
|
||||
|
||||
@Getter @Setter
|
||||
@ -89,43 +89,43 @@ public class Customer extends ContactBased<CustomerId> implements HasTenantId, E
|
||||
return super.getCreatedTime();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 6, required = true, value = "Country", example = "US")
|
||||
@ApiModelProperty(position = 6, value = "Country", example = "US")
|
||||
@Override
|
||||
public String getCountry() {
|
||||
return super.getCountry();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 7, required = true, value = "State", example = "NY")
|
||||
@ApiModelProperty(position = 7, value = "State", example = "NY")
|
||||
@Override
|
||||
public String getState() {
|
||||
return super.getState();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 8, required = true, value = "City", example = "New York")
|
||||
@ApiModelProperty(position = 8, value = "City", example = "New York")
|
||||
@Override
|
||||
public String getCity() {
|
||||
return super.getCity();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 9, required = true, value = "Address Line 1", example = "42 Broadway Suite 12-400")
|
||||
@ApiModelProperty(position = 9, value = "Address Line 1", example = "42 Broadway Suite 12-400")
|
||||
@Override
|
||||
public String getAddress() {
|
||||
return super.getAddress();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 10, required = true, value = "Address Line 2", example = "")
|
||||
@ApiModelProperty(position = 10, value = "Address Line 2", example = "")
|
||||
@Override
|
||||
public String getAddress2() {
|
||||
return super.getAddress2();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 11, required = true, value = "Zip code", example = "10004")
|
||||
@ApiModelProperty(position = 11, value = "Zip code", example = "10004")
|
||||
@Override
|
||||
public String getZip() {
|
||||
return super.getZip();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 12, required = true, value = "Phone number", example = "+1(415)777-7777")
|
||||
@ApiModelProperty(position = 12, value = "Phone number", example = "+1(415)777-7777")
|
||||
@Override
|
||||
public String getPhone() {
|
||||
return super.getPhone();
|
||||
|
||||
@ -85,7 +85,7 @@ public class DashboardInfo extends BaseData<DashboardId> implements HasName, Has
|
||||
this.tenantId = tenantId;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 4, value = "Title of the dashboard.")
|
||||
@ApiModelProperty(position = 4, required = true, value = "Title of the dashboard.")
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
@ -146,7 +146,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 6, required = true, value = "Device Profile Name", example = "Temperature Sensor")
|
||||
@ApiModelProperty(position = 6, value = "Device Profile Name", example = "Temperature Sensor")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
@ -155,7 +155,7 @@ public class Device extends BaseDataWithAdditionalInfo<DeviceId> implements HasL
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 7, required = true, value = "Label that may be used in widgets", example = "Room 234 Sensor")
|
||||
@ApiModelProperty(position = 7, value = "Label that may be used in widgets", example = "Room 234 Sensor")
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
|
||||
|
||||
private static final long serialVersionUID = 5582010124562018986L;
|
||||
|
||||
@ApiModelProperty(position = 7, required = true, value = "JSON object with the referenced Entity Id (Device or Asset).")
|
||||
@ApiModelProperty(position = 7, value = "JSON object with the referenced Entity Id (Device or Asset).")
|
||||
private EntityId entityId;
|
||||
private TenantId tenantId;
|
||||
private CustomerId customerId;
|
||||
@ -52,7 +52,7 @@ public class EntityView extends BaseDataWithAdditionalInfo<EntityViewId>
|
||||
@Length(fieldName = "type")
|
||||
@ApiModelProperty(position = 6, required = true, value = "Device Profile Name", example = "Temperature Sensor")
|
||||
private String type;
|
||||
@ApiModelProperty(position = 8, required = true, value = "Set of telemetry and attribute keys to expose via Entity View.")
|
||||
@ApiModelProperty(position = 8, value = "Set of telemetry and attribute keys to expose via Entity View.")
|
||||
private TelemetryEntityView keys;
|
||||
@ApiModelProperty(position = 9, value = "Represents the start time of the interval that is used to limit access to target device telemetry. Customer will not be able to see entity telemetry that is outside the specified interval;")
|
||||
private long startTimeMs;
|
||||
|
||||
@ -34,14 +34,14 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
|
||||
|
||||
@Length(fieldName = "title")
|
||||
@NoXss
|
||||
@ApiModelProperty(position = 3, value = "Title of the tenant", example = "Company A")
|
||||
@ApiModelProperty(position = 3, required = true, value = "Title of the tenant", example = "Company A")
|
||||
private String title;
|
||||
@NoXss
|
||||
@Length(fieldName = "region")
|
||||
@ApiModelProperty(position = 5, value = "Geo region of the tenant", example = "North America")
|
||||
private String region;
|
||||
|
||||
@ApiModelProperty(position = 6, required = true, value = "JSON object with Tenant Profile Id")
|
||||
@ApiModelProperty(position = 6, value = "JSON object with Tenant Profile Id")
|
||||
private TenantProfileId tenantProfileId;
|
||||
|
||||
public Tenant() {
|
||||
@ -111,43 +111,43 @@ public class Tenant extends ContactBased<TenantId> implements HasTenantId, HasTi
|
||||
return super.getCreatedTime();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 7, required = true, value = "Country", example = "US")
|
||||
@ApiModelProperty(position = 7, value = "Country", example = "US")
|
||||
@Override
|
||||
public String getCountry() {
|
||||
return super.getCountry();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 8, required = true, value = "State", example = "NY")
|
||||
@ApiModelProperty(position = 8, value = "State", example = "NY")
|
||||
@Override
|
||||
public String getState() {
|
||||
return super.getState();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 9, required = true, value = "City", example = "New York")
|
||||
@ApiModelProperty(position = 9, value = "City", example = "New York")
|
||||
@Override
|
||||
public String getCity() {
|
||||
return super.getCity();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 10, required = true, value = "Address Line 1", example = "42 Broadway Suite 12-400")
|
||||
@ApiModelProperty(position = 10, value = "Address Line 1", example = "42 Broadway Suite 12-400")
|
||||
@Override
|
||||
public String getAddress() {
|
||||
return super.getAddress();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 11, required = true, value = "Address Line 2", example = "")
|
||||
@ApiModelProperty(position = 11, value = "Address Line 2", example = "")
|
||||
@Override
|
||||
public String getAddress2() {
|
||||
return super.getAddress2();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 12, required = true, value = "Zip code", example = "10004")
|
||||
@ApiModelProperty(position = 12, value = "Zip code", example = "10004")
|
||||
@Override
|
||||
public String getZip() {
|
||||
return super.getZip();
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 13, required = true, value = "Phone number", example = "+1(415)777-7777")
|
||||
@ApiModelProperty(position = 13, value = "Phone number", example = "+1(415)777-7777")
|
||||
@Override
|
||||
public String getPhone() {
|
||||
return super.getPhone();
|
||||
|
||||
@ -129,7 +129,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
|
||||
this.authority = authority;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 8, required = true, value = "First name of the user", example = "John")
|
||||
@ApiModelProperty(position = 8, required = false, value = "First name of the user", example = "John")
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 9, required = true, value = "Last name of the user", example = "Doe")
|
||||
@ApiModelProperty(position = 9, required = false, value = "Last name of the user", example = "Doe")
|
||||
public String getLastName() {
|
||||
return lastName;
|
||||
}
|
||||
@ -147,7 +147,7 @@ public class User extends BaseDataWithAdditionalInfo<UserId> implements HasName,
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 10, required = true, value = "Phone number of the user", example = "38012345123")
|
||||
@ApiModelProperty(position = 10, required = false, value = "Phone number of the user", example = "38012345123")
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
@ -131,7 +131,7 @@ public class Asset extends BaseDataWithAdditionalInfo<AssetId> implements HasLab
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 6, required = true, value = "Asset type", example = "Building")
|
||||
@ApiModelProperty(position = 6, value = "Asset type", example = "Building")
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
@ -140,7 +140,7 @@ public class Asset extends BaseDataWithAdditionalInfo<AssetId> implements HasLab
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 7, required = true, value = "Label that may be used in widgets", example = "NY Building")
|
||||
@ApiModelProperty(position = 7, value = "Label that may be used in widgets", example = "NY Building")
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
@ -149,7 +149,7 @@ public class Asset extends BaseDataWithAdditionalInfo<AssetId> implements HasLab
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
@ApiModelProperty(position = 8, required = true, value = "JSON object with Asset Profile Id.")
|
||||
@ApiModelProperty(position = 8, value = "JSON object with Asset Profile Id.")
|
||||
public AssetProfileId getAssetProfileId() {
|
||||
return assetProfileId;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user