/// <summary>
 /// Sends a POST to '/api/scriptassignment/{id}/runs'
 /// </summary>
 /// <param name="id">a path parameter (no description)</param>
 /// <param name="model">a body parameter (no description)</param>
 /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
 /// <returns></returns>
 public static RestOperation CreateScriptRunForScriptAssignment(string id, CreateNewRun model, string expand = null)
 {
     return new RestOperation("POST", "api/scriptassignment/" + id + "/runs")
         {
             Content = model,                    QueryParams =
                 {
                      {"$expand", expand},
                 }
         };
 }
 public CreateNewRun Clone(bool includeLocalProperties)
 {
     var c = new CreateNewRun
             {
                 FieldValues = FieldValues,
                 TesterId = TesterId,
                 WidgetValues = WidgetValues,
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
partial         void CopyExtraPropertiesToClone(CreateNewRun clone, bool includeLocalProperties);
		/// <summary>
        /// Sends a POST to '/api/scriptassignment/{id}/runs'  (asynchronous)
        /// </summary>
        /// <param name="id">a path parameter (no description)</param>
        /// <param name="model">a body parameter (no description)</param>
        /// <param name="expand">a query parameter (Allows the specifying of eager-loading of related data which is returned in-line within the results of the request.)</param>
        /// <returns></returns>
        public virtual async Task<ScriptRun> CreateScriptRunForScriptAssignmentAsync(string id, CreateNewRun model, string expand = null)
        {
            var operation = Operations.CreateScriptRunForScriptAssignment(id, model, expand);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			var result = await response.Content.ReadAsAsync<ScriptRun>();
			return result;
						
		}