Ejemplo n.º 1
0
 private Region Set_region(Region v)
 {
     if (!this.IsNew)
     {
         throw new SaklientException("immutable_field", "Immutable fields cannot be modified after the resource creation: " + "saklient.cloud.resources.Bridge#Set_region");
     }
     this.M_region = v;
     this.N_region = true;
     return(this.M_region);
 }
Ejemplo n.º 2
0
 /// <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, "ID"))
     {
         this.M_id = Util.GetByPath(r, "ID") == null ? ((string)(null)) : "" + Util.GetByPath(r, "ID");
     }
     else
     {
         this.M_id         = null;
         this.IsIncomplete = true;
     }
     this.N_id = false;
     if (Util.ExistsPath(r, "Name"))
     {
         this.M_name = Util.GetByPath(r, "Name") == null ? ((string)(null)) : "" + Util.GetByPath(r, "Name");
     }
     else
     {
         this.M_name       = null;
         this.IsIncomplete = true;
     }
     this.N_name = false;
     if (Util.ExistsPath(r, "Description"))
     {
         this.M_description = Util.GetByPath(r, "Description") == null ? ((string)(null)) : "" + Util.GetByPath(r, "Description");
     }
     else
     {
         this.M_description = null;
         this.IsIncomplete  = true;
     }
     this.N_description = false;
     if (Util.ExistsPath(r, "Region"))
     {
         this.M_region = Util.GetByPath(r, "Region") == null ? null : new Region(this._Client, Util.GetByPath(r, "Region"));
     }
     else
     {
         this.M_region     = null;
         this.IsIncomplete = true;
     }
     this.N_region = false;
 }