internal void UpdateFrom(Proxy_Sr_stat proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; name_label = proxy.name_label == null ? null : proxy.name_label; name_description = proxy.name_description == null ? null : proxy.name_description; free_space = proxy.free_space == null ? 0 : long.Parse(proxy.free_space); total_space = proxy.total_space == null ? 0 : long.Parse(proxy.total_space); clustered = (bool)proxy.clustered; health = proxy.health == null ? (sr_health)0 : (sr_health)Helper.EnumParseDefault(typeof(sr_health), (string)proxy.health); }
public Proxy_Sr_stat ToProxy() { Proxy_Sr_stat result_ = new Proxy_Sr_stat(); result_.uuid = uuid; result_.name_label = name_label ?? ""; result_.name_description = name_description ?? ""; result_.free_space = free_space.ToString(); result_.total_space = total_space.ToString(); result_.clustered = clustered; result_.health = sr_health_helper.ToString(health); return(result_); }
/// <summary> /// Creates a new Sr_stat from a Proxy_Sr_stat. /// </summary> /// <param name="proxy"></param> public Sr_stat(Proxy_Sr_stat proxy) { UpdateFrom(proxy); }
/// <summary> /// Creates a new Sr_stat from a Proxy_Sr_stat. /// </summary> /// <param name="proxy"></param> public Sr_stat(Proxy_Sr_stat proxy) { this.UpdateFromProxy(proxy); }