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

com.huawei.openstack4j.openstack.heat.domain.HeatStack Maven / Gradle / Ivy

/*******************************************************************************
 * 	Copyright 2016 ContainX and OpenStack4j                                          
 * 	                                                                                 
 * 	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 com.huawei.openstack4j.openstack.heat.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonRootName;
import com.huawei.openstack4j.model.heat.Stack;
import com.huawei.openstack4j.openstack.common.GenericLink;
import com.huawei.openstack4j.openstack.common.ListResult;

import java.util.List;
import java.util.Map;

/**
 * This is a model of a heatstack. It uses Jackson annotations for
 * (de)serialization into JSON format
 * 
 * @author Matthias Reisser
 * 
 */
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonRootName("stack")
public class HeatStack implements Stack {
	private static final long serialVersionUID = 2151261616427716429L;
	
	@JsonProperty("id")
	private String id;
	@JsonProperty("stack_name")
	private String name;
	@JsonProperty("stack_status")
	private String status;
	@JsonProperty("stack_status_reason")
	private String stackStatusReason;
	@JsonProperty("description")
	private String description;
	@JsonProperty("template_description")
	private String templateDescription;
	@JsonProperty("timeout_mins")
	private Long timeoutMins;
	@JsonProperty("outputs")
	private List> outputs;
	@JsonProperty("parameters")
	private Map parameters;
	@JsonProperty("creation_time")
	private String creationTime;
	@JsonProperty("links")
	private List links;
	@JsonProperty("updated_time")
	private String updatedTime;
	@JsonProperty("tags")
	private List tags;

	@Override
	public String getId() {
		return id;
	}

	@Override
	public String getName() {

		return name;
	}

	@Override
	public String getStatus() {
		return status;
	}

	@Override
	public String getDescription() {
		return description;
	}

	@Override
	public String getTemplateDescription() {
		return templateDescription;
	}

	@Override
	public Long getTimeoutMins() {
		return timeoutMins;
	}

	@Override
	public List> getOutputs() {
		return outputs;
	}

	@Override
	public Map getParameters() {
		return parameters;
	}

	@Override
	public String getCreationTime() {
		return creationTime;
	}

	@Override
	public List getLinks() {
		return links;
	}

	@Override
	public String getUpdatedTime() {
		return updatedTime;
	}

	@Override
	public List getTags() {
		return tags;
	}

	@Override
	public String getStackStatusReason() {
		return stackStatusReason;
	}

	@Override
	public String toString() {
		return "HeatStack [id=" + id + ", name=" + name + ", status=" + status
				+ ", description=" + description + ", templateDescription="
				+ templateDescription + ", timeoutMins=" + timeoutMins
				+ ", outputs=" + outputs + ", parameters=" + parameters
				+ ", creationTime=" + creationTime + ", links=" + links
				+ ", updatedTime=" + updatedTime + ", tags=" + tags + "]";
	}

	/**
	 * An inner class for representing lists of HeatStacks
	 * 
	 * @author Matthias Reisser
	 * 
	 */
	public static class Stacks extends ListResult {
		private static final long serialVersionUID = 600661296207420793L;
		
		@JsonProperty("stacks")
		private List list;

		protected List value() {
			return list;
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy