/// <summary>指定したISOイメージが挿入されているサーバに絞り込みます。 /// /// <param name="iso" /> /// </summary> public Model_Server WithIsoImage(IsoImage iso) { this._FilterBy("Instance.CDROM.ID", new System.Collections.Generic.List <object> { iso._Id() }); return(this); }
/// <summary>サーバにISOイメージを挿入します。 /// /// <param name="iso" /> /// <returns>this</returns> /// </summary> public Server InsertIsoImage(IsoImage iso) { string path = this._ApiPath() + "/" + Util.UrlEncode(this._Id()) + "/cdrom"; object q = new System.Collections.Generic.Dictionary <string, object> { { "CDROM", new System.Collections.Generic.Dictionary <string, object> { { "ID", iso._Id() } } } }; this._Client.Request("PUT", path, q); this.Reload(); return(this); }
/// <summary>(This method is generated in Translator_default#buildImpl) /// /// <param name="r" /> /// </summary> internal override void ApiDeserializeImpl(object r) { this.IsNew = r == null; if (this.IsNew) { r = new System.Collections.Generic.Dictionary <string, object> { }; } this.IsIncomplete = false; if (Util.ExistsPath(r, "Status")) { this.M_status = Util.GetByPath(r, "Status") == null ? ((string)(null)) : "" + Util.GetByPath(r, "Status"); } else { this.M_status = null; this.IsIncomplete = true; } this.N_status = false; if (Util.ExistsPath(r, "BeforeStatus")) { this.M_beforeStatus = Util.GetByPath(r, "BeforeStatus") == null ? ((string)(null)) : "" + Util.GetByPath(r, "BeforeStatus"); } else { this.M_beforeStatus = null; this.IsIncomplete = true; } this.N_beforeStatus = false; if (Util.ExistsPath(r, "StatusChangedAt")) { this.M_statusChangedAt = Util.GetByPath(r, "StatusChangedAt") == null ? ((System.DateTime?)(null)) : Util.Str2date("" + Util.GetByPath(r, "StatusChangedAt")); } else { this.M_statusChangedAt = null; this.IsIncomplete = true; } this.N_statusChangedAt = false; if (Util.ExistsPath(r, "CDROM")) { this.M_isoImage = Util.GetByPath(r, "CDROM") == null ? null : new IsoImage(this._Client, Util.GetByPath(r, "CDROM")); } else { this.M_isoImage = null; this.IsIncomplete = true; } this.N_isoImage = false; }