public Proxy_VGPU_type ToProxy() { Proxy_VGPU_type result_ = new Proxy_VGPU_type(); result_.uuid = (uuid != null) ? uuid : ""; result_.vendor_name = (vendor_name != null) ? vendor_name : ""; result_.model_name = (model_name != null) ? model_name : ""; result_.framebuffer_size = framebuffer_size.ToString(); result_.max_heads = max_heads.ToString(); result_.max_resolution_x = max_resolution_x.ToString(); result_.max_resolution_y = max_resolution_y.ToString(); result_.supported_on_PGPUs = (supported_on_PGPUs != null) ? Helper.RefListToStringArray(supported_on_PGPUs) : new string[] {}; result_.enabled_on_PGPUs = (enabled_on_PGPUs != null) ? Helper.RefListToStringArray(enabled_on_PGPUs) : new string[] {}; result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {}; result_.supported_on_GPU_groups = (supported_on_GPU_groups != null) ? Helper.RefListToStringArray(supported_on_GPU_groups) : new string[] {}; result_.enabled_on_GPU_groups = (enabled_on_GPU_groups != null) ? Helper.RefListToStringArray(enabled_on_GPU_groups) : new string[] {}; return(result_); }
internal void UpdateFromProxy(Proxy_VGPU_type proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name; model_name = proxy.model_name == null ? null : (string)proxy.model_name; framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse((string)proxy.framebuffer_size); max_heads = proxy.max_heads == null ? 0 : long.Parse((string)proxy.max_heads); max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse((string)proxy.max_resolution_x); max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse((string)proxy.max_resolution_y); supported_on_PGPUs = proxy.supported_on_PGPUs == null ? null : XenRef <PGPU> .Create(proxy.supported_on_PGPUs); enabled_on_PGPUs = proxy.enabled_on_PGPUs == null ? null : XenRef <PGPU> .Create(proxy.enabled_on_PGPUs); VGPUs = proxy.VGPUs == null ? null : XenRef <VGPU> .Create(proxy.VGPUs); supported_on_GPU_groups = proxy.supported_on_GPU_groups == null ? null : XenRef <GPU_group> .Create(proxy.supported_on_GPU_groups); enabled_on_GPU_groups = proxy.enabled_on_GPU_groups == null ? null : XenRef <GPU_group> .Create(proxy.enabled_on_GPU_groups); }
public Proxy_VGPU_type ToProxy() { Proxy_VGPU_type result_ = new Proxy_VGPU_type(); result_.uuid = uuid ?? ""; result_.vendor_name = vendor_name ?? ""; result_.model_name = model_name ?? ""; result_.framebuffer_size = framebuffer_size.ToString(); result_.max_heads = max_heads.ToString(); result_.max_resolution_x = max_resolution_x.ToString(); result_.max_resolution_y = max_resolution_y.ToString(); result_.supported_on_PGPUs = (supported_on_PGPUs != null) ? Helper.RefListToStringArray(supported_on_PGPUs) : new string[] {}; result_.enabled_on_PGPUs = (enabled_on_PGPUs != null) ? Helper.RefListToStringArray(enabled_on_PGPUs) : new string[] {}; result_.VGPUs = (VGPUs != null) ? Helper.RefListToStringArray(VGPUs) : new string[] {}; result_.supported_on_GPU_groups = (supported_on_GPU_groups != null) ? Helper.RefListToStringArray(supported_on_GPU_groups) : new string[] {}; result_.enabled_on_GPU_groups = (enabled_on_GPU_groups != null) ? Helper.RefListToStringArray(enabled_on_GPU_groups) : new string[] {}; result_.implementation = vgpu_type_implementation_helper.ToString(implementation); result_.identifier = identifier ?? ""; result_.experimental = experimental; return(result_); }
internal void UpdateFromProxy(Proxy_VGPU_type proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name; model_name = proxy.model_name == null ? null : (string)proxy.model_name; framebuffer_size = proxy.framebuffer_size == null ? 0 : long.Parse((string)proxy.framebuffer_size); max_heads = proxy.max_heads == null ? 0 : long.Parse((string)proxy.max_heads); max_resolution_x = proxy.max_resolution_x == null ? 0 : long.Parse((string)proxy.max_resolution_x); max_resolution_y = proxy.max_resolution_y == null ? 0 : long.Parse((string)proxy.max_resolution_y); supported_on_PGPUs = proxy.supported_on_PGPUs == null ? null : XenRef <PGPU> .Create(proxy.supported_on_PGPUs); enabled_on_PGPUs = proxy.enabled_on_PGPUs == null ? null : XenRef <PGPU> .Create(proxy.enabled_on_PGPUs); VGPUs = proxy.VGPUs == null ? null : XenRef <VGPU> .Create(proxy.VGPUs); supported_on_GPU_groups = proxy.supported_on_GPU_groups == null ? null : XenRef <GPU_group> .Create(proxy.supported_on_GPU_groups); enabled_on_GPU_groups = proxy.enabled_on_GPU_groups == null ? null : XenRef <GPU_group> .Create(proxy.enabled_on_GPU_groups); implementation = proxy.implementation == null ? (vgpu_type_implementation)0 : (vgpu_type_implementation)Helper.EnumParseDefault(typeof(vgpu_type_implementation), (string)proxy.implementation); identifier = proxy.identifier == null ? null : (string)proxy.identifier; experimental = (bool)proxy.experimental; }
/// <summary> /// Creates a new VGPU_type from a Proxy_VGPU_type. /// </summary> /// <param name="proxy"></param> public VGPU_type(Proxy_VGPU_type proxy) { this.UpdateFromProxy(proxy); }
/// <summary> /// Creates a new VGPU_type from a Proxy_VGPU_type. /// </summary> /// <param name="proxy"></param> public VGPU_type(Proxy_VGPU_type proxy) { UpdateFrom(proxy); }