![JAR search and dependency download from the Maven repository](/logo.png)
com.evrythng.thng.resource.model.store.IdentifiersResource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of thng-resource-model Show documentation
Show all versions of thng-resource-model Show documentation
Models for REST resources representations.
/*
* (c) Copyright 2016 EVRYTHNG Ltd London / Zurich
* www.evrythng.com
*/
package com.evrythng.thng.resource.model.store;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
/**
* Represents list of identifiers resource with the same key.
*/
public class IdentifiersResource {
public static final String FIELD_KEY = "key";
public static final String FIELD_VALUES = "values";
private String key;
private Collection values;
private IdentifiersResource(final String key, final Collection values) {
this.key = key;
this.values = values;
}
/**
* Instantiates new instance of {@link IdentifiersResource}.
*
* @param key identifier key.
* @param values collection of values of identifier.
*
* @return instance of {@link IdentifiersResource}.
*/
@JsonCreator
public static IdentifiersResource of(@JsonProperty("key") final String key,
@JsonProperty("values") final Collection values) {
return new IdentifiersResource(key, values);
}
public String getKey() {
return key;
}
public void setKey(final String key) {
this.key = key;
}
public Collection getValues() {
return values;
}
public void setValues(final Collection values) {
this.values = values;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy