com.github.narcissujsk.openstackjsk.openstack.compute.domain.MetaDataWrapper Maven / Gradle / Ivy
The newest version!
package com.github.narcissujsk.openstackjsk.openstack.compute.domain;
import java.util.Map;
import com.github.narcissujsk.openstackjsk.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;
}
}