com.testdroid.api.model.APILabelGroup 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 com.testdroid.api.APIListResource;
import com.testdroid.api.dto.Context;
/**
* @author Łukasz Kajda
* @author Slawomir Pawluk
*/
public class APILabelGroup extends APIEntity {
private String displayName;
private String name;
public APILabelGroup() {
}
public APILabelGroup(Long id, String name, String displayName) {
super(id);
this.name = name;
this.displayName = displayName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
private String getDevicePropertiesURI() {
return createUri(selfURI, "/labels");
}
@JsonIgnore
public APIListResource getDevicePropertiesResource() {
return new APIListResource<>(client, getDevicePropertiesURI(), APIDeviceProperty.class);
}
@JsonIgnore
public APIListResource getDevicePropertiesResource(Context context) {
return new APIListResource<>(client, getDevicePropertiesURI(), context);
}
@Override
@JsonIgnore
protected void clone(T from) {
APILabelGroup apiLabelGroup = (APILabelGroup) from;
cloneBase(from);
this.displayName = apiLabelGroup.displayName;
this.name = apiLabelGroup.name;
}
}