org.opfab.externaldevices.model.UserConfiguration Maven / Gradle / Ivy
The newest version!
package org.opfab.externaldevices.model;
import java.util.Objects;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonInclude;
/**
* Definition of the external device to use for each user
*/
//@ApiModel(description = "Definition of the external device to use for each user")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class UserConfiguration {
private String userLogin = null;
private List externalDeviceIds = null;
public UserConfiguration userLogin(String userLogin) {
this.userLogin = userLogin;
return this;
}
/**
* Get userLogin
* @return userLogin
**/
//@ApiModelProperty(required = true, value = "")
public String getUserLogin() {
return userLogin;
}
public void setUserLogin(String userLogin) {
this.userLogin = userLogin;
}
public UserConfiguration externalDeviceIds(List externalDeviceIds) {
this.externalDeviceIds = externalDeviceIds;
return this;
}
public UserConfiguration addExternalDeviceIdsItem(String externalDeviceIdsItem) {
if (this.externalDeviceIds == null) {
this.externalDeviceIds = new ArrayList<>();
}
this.externalDeviceIds.add(externalDeviceIdsItem);
return this;
}
/**
* Get externalDeviceIds
* @return externalDeviceIds
**/
//@ApiModelProperty(value = "")
public List getExternalDeviceIds() {
return externalDeviceIds;
}
public void setExternalDeviceIds(List externalDeviceIds) {
this.externalDeviceIds = externalDeviceIds;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UserConfiguration userConfiguration = (UserConfiguration) o;
return Objects.equals(this.userLogin, userConfiguration.userLogin) &&
Objects.equals(this.externalDeviceIds, userConfiguration.externalDeviceIds);
}
@Override
public int hashCode() {
return Objects.hash(userLogin, externalDeviceIds);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class UserConfiguration {\n");
sb.append(" userLogin: ").append(toIndentedString(userLogin)).append("\n");
sb.append(" externalDeviceIds: ").append(toIndentedString(externalDeviceIds)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}