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

com.evrythng.thng.resource.model.access.ThngCredentials Maven / Gradle / Ivy

There is a newer version: 1.33
Show newest version
/*
 * (c) Copyright 2015 EVRYTHNG Ltd London / Zurich
 * www.evrythng.com
 */

package com.evrythng.thng.resource.model.access;

/**
 * Access credentials of an {@link com.evrythng.thng.resource.model.store.Thng}.
 */
public class ThngCredentials {

	private String thngId;
	private String thngApiKey;

	/**
	 * @return the thng id
	 */
	public String getThngId() {

		return thngId;
	}

	/**
	 * @param thngId the thng id to provide access to
	 */
	public void setThngId(final String thngId) {

		this.thngId = thngId;
	}

	/**
	 * @return the thng api key
	 */
	public String getThngApiKey() {

		return thngApiKey;
	}

	/**
	 * @param thngApiKey provided api key of the thing
	 */
	public void setThngApiKey(final String thngApiKey) {

		this.thngApiKey = thngApiKey;
	}

	@Override
	public final boolean equals(final Object o) {

		if (this == o) {
			return true;
		}
		if (o == null || getClass() != o.getClass()) {
			return false;
		}

		ThngCredentials that = (ThngCredentials) o;

		if (thngId != null ? !thngId.equals(that.thngId) : that.thngId != null) {
			return false;
		}
		if (thngApiKey != null ? !thngApiKey.equals(that.thngApiKey) : that.thngApiKey != null) {
			return false;
		}

		return true;
	}

	@Override
	public final int hashCode() {

		int result = thngId != null ? thngId.hashCode() : 0;
		result = 31 * result + (thngApiKey != null ? thngApiKey.hashCode() : 0);
		return result;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy