
org.xlcloud.service.Lease 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 java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* A lease represents a scheduled reservation of physical hosts.
*
* @author Krzysztof Szafrański, AMG.net
*/
@XmlAccessorType( XmlAccessType.FIELD )
@XmlType( name = "", propOrder = {
"reservations"
} )
@XmlRootElement( name = "lease" )
public class Lease implements Serializable{
private static final long serialVersionUID = 7785095005805819925L;
@XmlAttribute
private String id;
@XmlAttribute
private String name;
@XmlAttribute
private Date startDate;
@XmlAttribute
private Date endDate;
@XmlAttribute
private Long projectId;
@XmlAttribute
private Long duration;
@XmlAttribute
private LeaseStatus status;
@XmlElement( type = Reservation.class )
private List reservations;
/**
* Gets the value of {@link #id}.
* @return value of {@link #id}
*/
public String getId() {
return id;
}
/**
* Sets the value of {@link #id}.
* @param id - value
*/
public void setId(String id) {
this.id = id;
}
/**
* 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 #startDate}.
* @return value of {@link #startDate}
*/
public Date getStartDate() {
return startDate;
}
/**
* Sets the value of {@link #startDate}.
* @param startDate - value
*/
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
/**
* Gets the value of {@link #endDate}.
* @return value of {@link #endDate}
*/
public Date getEndDate() {
return endDate;
}
/**
* Sets the value of {@link #endDate}.
* @param endDate - value
*/
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
* Gets the value of {@link #reservations}.
* @return value of {@link #reservations}
*/
public List getReservations() {
if (reservations == null) {
reservations = new ArrayList<>();
}
return reservations;
}
public void setReservations(List reservations) {
this.reservations = reservations;
}
/**
* Gets the value of {@link #status}.
* @return value of {@link #status}
*/
public LeaseStatus getStatus() {
return status;
}
/**
* Sets the value of {@link #status}.
* @param status - value
*/
public void setStatus(LeaseStatus status) {
this.status = status;
}
/**
* Gets the value of {@link #projectId}.
* @return value of {@link #projectId}
*/
public Long getProjectId() {
return projectId;
}
/**
* Sets the value of {@link #projectId}.
* @param projectId - value
*/
public void setProjectId(Long projectId) {
this.projectId = projectId;
}
/**
* Gets the value of {@link #duration}.
* @return value of {@link #duration}
*/
public Long getDuration() {
return duration;
}
/**
* Sets the value of {@link #duration}.
* @param duration - value
*/
public void setDuration(Long duration) {
this.duration = duration;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy