org.openstack4j.openstack.sahara.domain.SaharaDataSourceCredentials Maven / Gradle / Ivy
package org.openstack4j.openstack.sahara.domain;
import org.openstack4j.model.sahara.DataSourceCredentials;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.google.common.base.Objects;
/**
* For mapping JSON response to/from java objects
*
* @author [email protected]
* @author [email protected]
*/
@JsonRootName("credentials")
@JsonIgnoreProperties(ignoreUnknown=true)
public class SaharaDataSourceCredentials implements DataSourceCredentials {
private static final long serialVersionUID = 1L;
private String password;
private String user;
SaharaDataSourceCredentials(String user, String password) {
this.user = user;
this.password = password;
}
/**
* {@inheritDoc}
*/
@Override
public String getUser() {
return user;
}
/**
* {@inheritDoc}
*/
@Override
public String getPassword() {
return password;
}
@Override
public String toString() {
return Objects.toStringHelper(this).omitNullValues()
.add("password", password)
.add("user", user)
.toString();
}
}