All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evrythng.thng.resource.model.store.IdentifiersResource Maven / Gradle / Ivy

There is a newer version: 1.33
Show newest version
/*
 * (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