package com.peterphi.std.guice.config.rest.types;

import com.google.common.base.Objects;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;

@XmlType(name = "ConfigValueType")
public class ConfigPropertyValue
{
	/**
	 *
	 */
	@XmlAttribute
	public String path;

	@XmlAttribute
	public String name;

	@XmlValue
	public String value;


	public ConfigPropertyValue(final String path, final String name, final String value)
	{
		this.path = path;
		this.name = name;
		this.value = value;
	}


	public String getPath()
	{
		return path;
	}


	public String getName()
	{
		return name;
	}


	public String getValue()
	{
		return value;
	}


	@Override
	public String toString()
	{
		return Objects.toStringHelper(this)
		              .omitNullValues()
		              .add("path", path)
		              .add("name", name)
		              .add("value", value)
		              .toString();
	}
}

@@ -287,16 +287,84 @@
 Value%0A%7B%0A
+%09public ConfigPropertyValue()%7B%0A%09%09//default constructor for jaxb%0A%09%7D%0A%0A
 %09/**%0A%09 *

add default constructor unmarshalling