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

org.openstack4j.openstack.compute.domain.MetaDataWrapper Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.openstack.compute.domain;

import java.util.Map;

import org.openstack4j.model.ModelEntity;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * A Wrapper for Rest calls to set/update Meta Data
 * 
 * @author Jeremy Unruh
 */
public class MetaDataWrapper implements ModelEntity {

	private static final long serialVersionUID = 1L;

	@JsonProperty("metadata")
	Map metadata;
	
	public MetaDataWrapper() { }
	
	private MetaDataWrapper(Map metadata) {
		this.metadata = metadata;
	}
	
	/**
	 * Wraps the given MetaData map into the wrapper
	 *
	 * @param metadata the metadata
	 * @return the meta data wrapper
	 */
	public static MetaDataWrapper wrap(Map metadata) {
		return new MetaDataWrapper(metadata);
	}
	
	/**
	 * @return the meta data
	 */
	public Map getMetaData() {
		return metadata;
	}
	
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy