/// <summary>
 /// Sends a POST to '/api/users'
 /// </summary>
 /// <param name="model">a body parameter (no description)</param>
 /// <returns></returns>
 public static RestOperation CreateUser(CreateOrUpdateUser model)
 {
     return new RestOperation("POST", "api/users")
         {
             Content = model
         };
 }
 /// <summary>
 /// Sends a PUT to '/api/user/{id}'
 /// </summary>
 /// <param name="id">a path parameter (no description)</param>
 /// <param name="model">a body parameter (no description)</param>
 /// <returns></returns>
 public static RestOperation UpdateUser(string id, CreateOrUpdateUser model)
 {
     return new RestOperation("PUT", "api/user/" + id + "")
         {
             Content = model
         };
 }
partial         void CopyExtraPropertiesToClone(CreateOrUpdateUser clone, bool includeLocalProperties);
 public CreateOrUpdateUser Clone(bool includeLocalProperties)
 {
     var c = new CreateOrUpdateUser
             {
                 Email = Email,
                 Enabled = Enabled,
                 FirstName = FirstName,
                 Id = Id,
                 IsExternal = IsExternal,
                 LastName = LastName,
                 Password = Password,
                 Phone = Phone,
                 UserName = UserName,
             };
     CopyExtraPropertiesToClone(c, includeLocalProperties);
     return c;
 }
		/// <summary>
        /// Sends a POST to '/api/users'  (asynchronous)
        /// </summary>
        /// <param name="model">a body parameter (no description)</param>
        /// <returns></returns>
        public virtual async Task<User> CreateUserAsync(CreateOrUpdateUser model)
        {
            var operation = Operations.CreateUser(model);
			var response = await _client.SendAsync(operation.BuildRequest(_client));
			EnsureSuccess(response);
			var result = await response.Content.ReadAsAsync<User>();
			return result;
						
		}
        /// <summary>
        /// Sends a POST to '/api/users'
        /// </summary>
        /// <param name="model">a body parameter (no description)</param>
        /// <returns></returns>
        public virtual User CreateUser(CreateOrUpdateUser model)
        {
            var operation = Operations.CreateUser(model);
			var response = _client.SendAsync(operation.BuildRequest(_client)).Result;
			EnsureSuccess(response);
			var result = response.Content.ReadAsAsync<User>().Result;
			return result;
			
		}