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

org.xlcloud.service.Keypair Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2012 AMG.lab, a Bull Group Company
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *    http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.xlcloud.service;

import java.io.Serializable;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.bind.annotation.XmlType;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * Class represents Openstack Keypair, enables user to set up resources ssh
 * key.
 * 
 * @author Michał Kamiński, AMG.net
 */
@XmlAccessorType( XmlAccessType.FIELD )
@XmlType( name = "", propOrder = {} )
@XmlRootElement( name = "keypair" )
public class Keypair implements Serializable {

    /**
     * TODO Documentation serialVersionUID
     */
    private static final long serialVersionUID = -6214323597843570878L;

    @XmlAttribute
    private String name;

    @XmlAttribute
    private String privateKey;

    @XmlAttribute
    private String publicKey;

    @XmlAttribute
    private String fingerprint;

    @XmlTransient
    @JsonIgnore
    private String userId;

    @XmlAttribute
    public String getHref() {
        return "/users/" + userId + "/os-keypairs/" + name;
    }

    public void setHref(String href) {
    }

    /**
     * Gets the value of {@link #name}.
     * 
     * @return value of {@link #name}
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the value of {@link #name}.
     * 
     * @param name
     *            - value
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * Gets the value of {@link #privateKey}.
     * 
     * @return value of {@link #privateKey}
     */
    public String getPrivateKey() {
        return privateKey;
    }

    /**
     * Sets the value of {@link #privateKey}.
     * 
     * @param privateKey
     *            - value
     */
    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    /**
     * Gets the value of {@link #publicKey}.
     * 
     * @return value of {@link #publicKey}
     */
    public String getPublicKey() {
        return publicKey;
    }

    /**
     * Sets the value of {@link #publicKey}.
     * 
     * @param publicKey
     *            - value
     */
    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }

    /**
     * Gets the value of {@link #fingerprint}.
     * 
     * @return value of {@link #fingerprint}
     */
    public String getFingerprint() {
        return fingerprint;
    }

    /**
     * Sets the value of {@link #fingerprint}.
     * 
     * @param fingerprint
     *            - value
     */
    public void setFingerprint(String fingerprint) {
        this.fingerprint = fingerprint;
    }

    /**
     * Sets the value of {@link #userId}.
     * 
     * @param userId
     *            - value
     */
    public void setUserId(String userId) {
        this.userId = userId;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy