internal void UpdateFromProxy(Proxy_VM_appliance proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; name_label = proxy.name_label == null ? null : (string)proxy.name_label; name_description = proxy.name_description == null ? null : (string)proxy.name_description; allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList <vm_appliance_operation>(proxy.allowed_operations); current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_vm_appliance_operation(proxy.current_operations); VMs = proxy.VMs == null ? null : XenRef <VM> .Create(proxy.VMs); }
public Proxy_VM_appliance ToProxy() { Proxy_VM_appliance result_ = new Proxy_VM_appliance(); result_.uuid = uuid ?? ""; result_.name_label = name_label ?? ""; result_.name_description = name_description ?? ""; result_.allowed_operations = allowed_operations == null ? new string[] {} : Helper.ObjectListToStringArray(allowed_operations); result_.current_operations = Maps.convert_to_proxy_string_vm_appliance_operation(current_operations); result_.VMs = VMs == null ? new string[] {} : Helper.RefListToStringArray(VMs); return result_; }
public Proxy_VM_appliance ToProxy() { Proxy_VM_appliance result_ = new Proxy_VM_appliance(); result_.uuid = (uuid != null) ? uuid : ""; result_.name_label = (name_label != null) ? name_label : ""; result_.name_description = (name_description != null) ? name_description : ""; result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {}; result_.current_operations = Maps.convert_to_proxy_string_vm_appliance_operation(current_operations); result_.VMs = (VMs != null) ? Helper.RefListToStringArray(VMs) : new string[] {}; return(result_); }
public override string SaveChanges(Session session, string opaqueRef, VM_appliance server) { if (opaqueRef == null) { Proxy_VM_appliance p = this.ToProxy(); return(session.proxy.vm_appliance_create(session.uuid, p).parse()); } else { if (!Helper.AreEqual2(_name_label, server._name_label)) { VM_appliance.set_name_label(session, opaqueRef, _name_label); } if (!Helper.AreEqual2(_name_description, server._name_description)) { VM_appliance.set_name_description(session, opaqueRef, _name_description); } return(null); } }
/// <summary> /// Creates a new VM_appliance from a Proxy_VM_appliance. /// </summary> /// <param name="proxy"></param> public VM_appliance(Proxy_VM_appliance proxy) { this.UpdateFromProxy(proxy); }
/// <summary> /// Creates a new VM_appliance from a Proxy_VM_appliance. /// </summary> /// <param name="proxy"></param> public VM_appliance(Proxy_VM_appliance proxy) { UpdateFrom(proxy); }