internal void UpdateFromProxy(Proxy_VM_guest_metrics proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version); PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version); PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date; memory = proxy.memory == null ? null : Maps.convert_from_proxy_string_string(proxy.memory); disks = proxy.disks == null ? null : Maps.convert_from_proxy_string_string(proxy.disks); networks = proxy.networks == null ? null : Maps.convert_from_proxy_string_string(proxy.networks); other = proxy.other == null ? null : Maps.convert_from_proxy_string_string(proxy.other); last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); live = (bool)proxy.live; }
internal void UpdateFrom(Proxy_VM_guest_metrics proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version); PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version); PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date; memory = proxy.memory == null ? null : Maps.convert_from_proxy_string_string(proxy.memory); disks = proxy.disks == null ? null : Maps.convert_from_proxy_string_string(proxy.disks); networks = proxy.networks == null ? null : Maps.convert_from_proxy_string_string(proxy.networks); other = proxy.other == null ? null : Maps.convert_from_proxy_string_string(proxy.other); last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); live = (bool)proxy.live; can_use_hotplug_vbd = proxy.can_use_hotplug_vbd == null ? (tristate_type)0 : (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), (string)proxy.can_use_hotplug_vbd); can_use_hotplug_vif = proxy.can_use_hotplug_vif == null ? (tristate_type)0 : (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), (string)proxy.can_use_hotplug_vif); PV_drivers_detected = (bool)proxy.PV_drivers_detected; }
public Proxy_VM_guest_metrics ToProxy() { Proxy_VM_guest_metrics result_ = new Proxy_VM_guest_metrics(); result_.uuid = (uuid != null) ? uuid : ""; result_.os_version = Maps.convert_to_proxy_string_string(os_version); result_.PV_drivers_version = Maps.convert_to_proxy_string_string(PV_drivers_version); result_.PV_drivers_up_to_date = PV_drivers_up_to_date; result_.memory = Maps.convert_to_proxy_string_string(memory); result_.disks = Maps.convert_to_proxy_string_string(disks); result_.networks = Maps.convert_to_proxy_string_string(networks); result_.other = Maps.convert_to_proxy_string_string(other); result_.last_updated = last_updated; result_.other_config = Maps.convert_to_proxy_string_string(other_config); result_.live = live; return(result_); }
public Proxy_VM_guest_metrics ToProxy() { Proxy_VM_guest_metrics result_ = new Proxy_VM_guest_metrics(); result_.uuid = uuid ?? ""; result_.os_version = Maps.convert_to_proxy_string_string(os_version); result_.PV_drivers_version = Maps.convert_to_proxy_string_string(PV_drivers_version); result_.PV_drivers_up_to_date = PV_drivers_up_to_date; result_.memory = Maps.convert_to_proxy_string_string(memory); result_.disks = Maps.convert_to_proxy_string_string(disks); result_.networks = Maps.convert_to_proxy_string_string(networks); result_.other = Maps.convert_to_proxy_string_string(other); result_.last_updated = last_updated; result_.other_config = Maps.convert_to_proxy_string_string(other_config); result_.live = live; result_.can_use_hotplug_vbd = tristate_type_helper.ToString(can_use_hotplug_vbd); result_.can_use_hotplug_vif = tristate_type_helper.ToString(can_use_hotplug_vif); result_.PV_drivers_detected = PV_drivers_detected; return(result_); }
/// <summary> /// Creates a new VM_guest_metrics from a Proxy_VM_guest_metrics. /// </summary> /// <param name="proxy"></param> public VM_guest_metrics(Proxy_VM_guest_metrics proxy) { UpdateFrom(proxy); }
/// <summary> /// Creates a new VM_guest_metrics from a Proxy_VM_guest_metrics. /// </summary> /// <param name="proxy"></param> public VM_guest_metrics(Proxy_VM_guest_metrics proxy) { this.UpdateFromProxy(proxy); }