org.openstack4j.openstack.compute.domain.MetaDataWrapper Maven / Gradle / Ivy
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;
}
}