com.testdroid.api.model.APIFileConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testdroid-api Show documentation
Show all versions of testdroid-api Show documentation
The Testdroid API library for Java
package com.testdroid.api.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.testdroid.api.APIEntity;
import jakarta.xml.bind.annotation.XmlType;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* @author Michał Szpruta
*/
public class APIFileConfig extends APIEntity implements Serializable {
private static final long serialVersionUID = 1L;
@XmlType(namespace = "APIFileConfig")
public enum Action {
COPY_TO_DEVICE("data"),
INSTALL("app"),
RUN_TEST("test");
private final String fileType;
Action(String fileType) {
this.fileType = fileType;
}
public String getFileType() {
return fileType;
}
}
private Action action;
private List availableActions = new ArrayList<>();
private APIUserFile file;
public APIFileConfig() {
}
public APIFileConfig(Long id, Action action) {
super(id);
this.action = action;
}
public Action getAction() {
return action;
}
public void setAction(Action action) {
this.action = action;
}
public List getAvailableActions() {
return availableActions;
}
public void setAvailableActions(List availableActions) {
this.availableActions = availableActions;
}
public APIUserFile getFile() {
return file;
}
public void setFile(APIUserFile file) {
if (file != null) {
this.id = file.getId();
}
this.file = file;
}
@Override
@JsonIgnore
protected void clone(T from) {
APIFileConfig original = (APIFileConfig) from;
cloneBase(original);
this.action = original.action;
this.availableActions = original.availableActions;
this.file = original.file;
}
}