/// <summary>
      /// Updates ResourcesAssignments with spectial Uid Updates ResourcesAssignments with spectial Uid
      /// </summary>
      /// <param name="name"></param>
      /// <param name="assignmentUid"></param>
      /// <param name="mode"></param>
      /// <param name="recalculate"></param>
      /// <param name="storage"></param>
      /// <param name="folder"></param>
      /// <param name="fileName"></param>
      /// <param name="body"></param>
      /// <returns></returns>
      public AssignmentResponse PutProjectAssignment (string name, int? assignmentUid, string mode, bool? recalculate, string storage, string folder, string fileName, ResourceAssignment body) {
        // create path and map variables
        var ResourcePath = "/tasks/{name}/assignments/{assignmentUid}/?appSid={appSid}&amp;mode={mode}&amp;recalculate={recalculate}&amp;storage={storage}&amp;folder={folder}&amp;fileName={fileName}".Replace("{format}","json");
		ResourcePath = Regex.Replace(ResourcePath, "\\*", "").Replace("&amp;", "&").Replace("/?", "?").Replace("toFormat={toFormat}", "format={format}");

        // query params
        var queryParams = new Dictionary<String, String>();
        var headerParams = new Dictionary<String, String>();
        var formParams = new Dictionary<String, object>();

        // verify required params are set
        if (name == null || assignmentUid == null || body == null ) {
           throw new ApiException(400, "missing required params");
        }
        if (name == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])name=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "name" + "}", apiInvoker.ToPathValue(name)); 
		}
        if (assignmentUid == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])assignmentUid=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "assignmentUid" + "}", apiInvoker.ToPathValue(assignmentUid)); 
		}
        if (mode == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])mode=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "mode" + "}", apiInvoker.ToPathValue(mode)); 
		}
        if (recalculate == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])recalculate=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "recalculate" + "}", apiInvoker.ToPathValue(recalculate)); 
		}
        if (storage == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])storage=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "storage" + "}", apiInvoker.ToPathValue(storage)); 
		}
        if (folder == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])folder=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "folder" + "}", apiInvoker.ToPathValue(folder)); 
		}
        if (fileName == null){
		  ResourcePath = Regex.Replace(ResourcePath, @"([&?])fileName=", "");
		}else{
		  ResourcePath = ResourcePath.Replace("{" + "fileName" + "}", apiInvoker.ToPathValue(fileName)); 
		}
        try {
          if (typeof(AssignmentResponse) == typeof(ResponseMessage)) {
            var response = apiInvoker.invokeBinaryAPI(basePath, ResourcePath, "PUT", queryParams, null, headerParams, formParams);
            return (AssignmentResponse) ApiInvoker.deserialize(response, typeof(AssignmentResponse));
          } else {
            var response = apiInvoker.invokeAPI(basePath, ResourcePath, "PUT", queryParams, body, headerParams, formParams);
            if(response != null){
               return (AssignmentResponse) ApiInvoker.deserialize(response, typeof(AssignmentResponse));
            }
            else {
              return null;
            }
          }
        } catch (ApiException ex) {
          if(ex.ErrorCode == 404) {
          	return null;
          }
          else {
            throw ex;
          }
        }
      }
        public void TestPutProjectAssignment()
        {
            TasksApi target = new TasksApi(APIKEY, APPSID, BASEPATH);
            StorageApi storageApi = new StorageApi(APIKEY, APPSID, BASEPATH);


            string name = "Outlinecode.mpp";
            int? assignmentUid = 1;
            string mode = null;
            bool? recalculate = null;
            string storage = null;
            string folder = null;
            string fileName = null;
            ResourceAssignment body = new ResourceAssignment();
            body.TaskUid = 1;
            body.ResourceUid = -1;
            body.Uid = 1;

            storageApi.PutCreate(name, null, null, System.IO.File.ReadAllBytes("\\temp\\tasks\\resources\\" + name));
            AssignmentResponse actual;
            actual = target.PutProjectAssignment(name, assignmentUid, mode, recalculate, storage, folder, fileName, body);
            Assert.AreEqual("200", actual.Code);
            Assert.IsInstanceOfType(new AssignmentResponse(), actual.GetType());
        }