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

org.openstack4j.openstack.sahara.domain.SaharaDataSourceCredentials Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
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();
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy