/// <summary>
        /// Grant user access Grant the specified user access to the specified project
        /// </summary>
        /// <param name="orgid">Organization identifier</param>
        /// <param name="projectid">Project identifier</param>
        /// <param name="options"></param>
        /// <returns>Task of InlineResponse2009</returns>
        public async System.Threading.Tasks.Task<InlineResponse2009> AddUserToProjectAsync (string orgid, string projectid, Options5 options = null)
        {
             ApiResponse<InlineResponse2009> response = await AddUserToProjectAsyncWithHttpInfo(orgid, projectid, options);
             return response.Data;

        }
        /// <summary>
        /// Grant user access Grant the specified user access to the specified project
        /// </summary>
        /// <param name="orgid">Organization identifier</param>
        /// <param name="projectid">Project identifier</param>
        /// <param name="options"></param>
        /// <returns>Task of ApiResponse (InlineResponse2009)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<InlineResponse2009>> AddUserToProjectAsyncWithHttpInfo (string orgid, string projectid, Options5 options = null)
        {
            // verify the required parameter 'orgid' is set
            if (orgid == null) throw new ApiException(400, "Missing required parameter 'orgid' when calling AddUserToProject");
            // verify the required parameter 'projectid' is set
            if (projectid == null) throw new ApiException(400, "Missing required parameter 'projectid' when calling AddUserToProject");
            
    
            var path_ = "/orgs/{orgid}/projects/{projectid}/users";
    
            var pathParams = new Dictionary<String, String>();
            var queryParams = new Dictionary<String, String>();
            var headerParams = new Dictionary<String, String>(Configuration.DefaultHeader);
            var formParams = new Dictionary<String, String>();
            var fileParams = new Dictionary<String, FileParameter>();
            Object postBody = null;

            // to determine the Content-Type header
            String[] httpContentTypes = new String[] {
                "application/json"
            };
            String httpContentType = Configuration.ApiClient.SelectHeaderContentType(httpContentTypes);

            // to determine the Accept header
            String[] httpHeaderAccepts = new String[] {
                "application/json", "text/plain", "text/html"
            };
            String httpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(httpHeaderAccepts);
            if (httpHeaderAccept != null)
                headerParams.Add("Accept", httpHeaderAccept);

            // set "format" to json by default
            // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
            pathParams.Add("format", "json");
            if (orgid != null) pathParams.Add("orgid", Configuration.ApiClient.ParameterToString(orgid)); // path parameter
            if (projectid != null) pathParams.Add("projectid", Configuration.ApiClient.ParameterToString(projectid)); // path parameter
            
            
            
            
            postBody = Configuration.ApiClient.Serialize(options); // http body (model) parameter
            

            
            // authentication (apikey) required
            
            // http basic authentication required
            if (!String.IsNullOrEmpty(Configuration.Username) || !String.IsNullOrEmpty(Configuration.Password))
            {
                headerParams["Authorization"] = "Basic " + Base64Encode(Configuration.Username + ":" + Configuration.Password);
            }
            
            // authentication (permissions) required
            
            // oauth required
            if (!String.IsNullOrEmpty(Configuration.AccessToken))
            {
                headerParams["Authorization"] = "Bearer " + Configuration.AccessToken;
            }
            

            // make the HTTP request
            IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, 
                Method.POST, queryParams, postBody, headerParams, formParams, fileParams, 
                pathParams, httpContentType);

            int statusCode = (int) response.StatusCode;
 
            if (statusCode >= 400)
                throw new ApiException (statusCode, "Error calling AddUserToProject: " + response.Content, response.Content);
            else if (statusCode == 0)
                throw new ApiException (statusCode, "Error calling AddUserToProject: " + response.ErrorMessage, response.ErrorMessage);

            return new ApiResponse<InlineResponse2009>(statusCode,
                response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
                (InlineResponse2009) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2009)));
            
        }
 /// <summary>
 /// Grant user access Grant the specified user access to the specified project
 /// </summary>
 /// <param name="orgid">Organization identifier</param> 
 /// <param name="projectid">Project identifier</param> 
 /// <param name="options"></param> 
 /// <returns>InlineResponse2009</returns>
 public InlineResponse2009 AddUserToProject (string orgid, string projectid, Options5 options = null)
 {
      ApiResponse<InlineResponse2009> response = AddUserToProjectWithHttpInfo(orgid, projectid, options);
      return response.Data;
 }