Example #1
0
        public Proxy_PVS_cache_storage ToProxy()
        {
            Proxy_PVS_cache_storage result_ = new Proxy_PVS_cache_storage();

            result_.uuid = uuid ?? "";
            result_.host = host ?? "";
            result_.SR   = SR ?? "";
            result_.site = site ?? "";
            result_.size = size.ToString();
            result_.VDI  = VDI ?? "";
            return(result_);
        }
Example #2
0
        internal void UpdateFrom(Proxy_PVS_cache_storage proxy)
        {
            uuid = proxy.uuid == null ? null : proxy.uuid;
            host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host);

            SR = proxy.SR == null ? null : XenRef <SR> .Create(proxy.SR);

            site = proxy.site == null ? null : XenRef <PVS_site> .Create(proxy.site);

            size = proxy.size == null ? 0 : long.Parse(proxy.size);
            VDI  = proxy.VDI == null ? null : XenRef <VDI> .Create(proxy.VDI);
        }
Example #3
0
        public Proxy_PVS_cache_storage ToProxy()
        {
            Proxy_PVS_cache_storage result_ = new Proxy_PVS_cache_storage();

            result_.uuid = (uuid != null) ? uuid : "";
            result_.host = (host != null) ? host : "";
            result_.SR   = (SR != null) ? SR : "";
            result_.site = (site != null) ? site : "";
            result_.size = size.ToString();
            result_.VDI  = (VDI != null) ? VDI : "";
            return(result_);
        }
Example #4
0
 public override string SaveChanges(Session session, string opaqueRef, PVS_cache_storage server)
 {
     if (opaqueRef == null)
     {
         Proxy_PVS_cache_storage p = this.ToProxy();
         return(session.proxy.pvs_cache_storage_create(session.uuid, p).parse());
     }
     else
     {
         throw new InvalidOperationException("This type has no read/write properties");
     }
 }
Example #5
0
 /// <summary>
 /// Creates a new PVS_cache_storage from a Proxy_PVS_cache_storage.
 /// </summary>
 /// <param name="proxy"></param>
 public PVS_cache_storage(Proxy_PVS_cache_storage proxy)
 {
     UpdateFrom(proxy);
 }
Example #6
0
 /// <summary>
 /// Creates a new PVS_cache_storage from a Proxy_PVS_cache_storage.
 /// </summary>
 /// <param name="proxy"></param>
 public PVS_cache_storage(Proxy_PVS_cache_storage proxy)
 {
     this.UpdateFromProxy(proxy);
 }