internal void UpdateFromProxy(Proxy_VIF proxy) { this.uuid = (proxy.uuid == null) ? null : proxy.uuid; this.allowed_operations = (proxy.allowed_operations == null) ? null : Helper.StringArrayToEnumList <vif_operations>(proxy.allowed_operations); this.current_operations = (proxy.current_operations == null) ? null : Maps.convert_from_proxy_string_vif_operations(proxy.current_operations); this.device = (proxy.device == null) ? null : proxy.device; this.network = (proxy.network == null) ? null : XenRef <Network> .Create(proxy.network); this.VM = (proxy.VM == null) ? null : XenRef <WinAPI.VM> .Create(proxy.VM); this.MAC = (proxy.MAC == null) ? null : proxy.MAC; this.MTU = (proxy.MTU == null) ? 0L : long.Parse(proxy.MTU); this.other_config = (proxy.other_config == null) ? null : Maps.convert_from_proxy_string_string(proxy.other_config); this.currently_attached = proxy.currently_attached; this.status_code = (proxy.status_code == null) ? 0L : long.Parse(proxy.status_code); this.status_detail = (proxy.status_detail == null) ? null : proxy.status_detail; this.runtime_properties = (proxy.runtime_properties == null) ? null : Maps.convert_from_proxy_string_string(proxy.runtime_properties); this.qos_algorithm_type = (proxy.qos_algorithm_type == null) ? null : proxy.qos_algorithm_type; this.qos_algorithm_params = (proxy.qos_algorithm_params == null) ? null : Maps.convert_from_proxy_string_string(proxy.qos_algorithm_params); this.qos_supported_algorithms = (proxy.qos_supported_algorithms == null) ? new string[0] : proxy.qos_supported_algorithms; this.metrics = (proxy.metrics == null) ? null : XenRef <VIF_metrics> .Create(proxy.metrics); this.MAC_autogenerated = proxy.MAC_autogenerated; this.locking_mode = (proxy.locking_mode == null) ? vif_locking_mode.network_default : ((vif_locking_mode)Helper.EnumParseDefault(typeof(vif_locking_mode), proxy.locking_mode)); this.ipv4_allowed = (proxy.ipv4_allowed == null) ? new string[0] : proxy.ipv4_allowed; this.ipv6_allowed = (proxy.ipv6_allowed == null) ? new string[0] : proxy.ipv6_allowed; }
public override string SaveChanges(Session session, string opaqueRef, VIF server) { if (opaqueRef == null) { Proxy_VIF y_vif = this.ToProxy(); return(session.proxy.vif_create(session.uuid, y_vif).parse()); } if (!Helper.AreEqual2 <Dictionary <string, string> >(this._other_config, server._other_config)) { set_other_config(session, opaqueRef, this._other_config); } if (!Helper.AreEqual2 <string>(this._qos_algorithm_type, server._qos_algorithm_type)) { set_qos_algorithm_type(session, opaqueRef, this._qos_algorithm_type); } if (!Helper.AreEqual2 <Dictionary <string, string> >(this._qos_algorithm_params, server._qos_algorithm_params)) { set_qos_algorithm_params(session, opaqueRef, this._qos_algorithm_params); } if (!Helper.AreEqual2 <vif_locking_mode>(this._locking_mode, server._locking_mode)) { set_locking_mode(session, opaqueRef, this._locking_mode); } if (!Helper.AreEqual2 <string[]>(this._ipv4_allowed, server._ipv4_allowed)) { set_ipv4_allowed(session, opaqueRef, this._ipv4_allowed); } if (!Helper.AreEqual2 <string[]>(this._ipv6_allowed, server._ipv6_allowed)) { set_ipv6_allowed(session, opaqueRef, this._ipv6_allowed); } return(null); }
public VIF(Proxy_VIF proxy) { this.UpdateFromProxy(proxy); }