/// <summary>
 /// Creates a new component in a project.
 /// </summary>
 /// <param name="projectKey">The key for the project in which to create the new component.</param>
 /// <param name="componentInput">A class containing the essential information about the component.</param>
 /// <returns>The newly created component.</returns>
 /// <exception cref="WebServiceException">The caller is not logged in and does not have permission to create components in the project.</exception>
 public Component CreateComponent(string projectKey, ComponentInput componentInput)
 {
     var helper = new ComponentInputWithProjectKey(projectKey, componentInput);
     var json = ComponentInputWithProjectKeyJsonGenerator.Generate(helper);
     return client.Post<Component>(baseComponentUri.ToString(), json);
 }
 /// <summary>
 /// Creates a new component in a project.
 /// </summary>
 /// <param name="componentUri">The URI for the selected component.</param>
 /// <param name="componentInput">A class containing the essential information about the component.</param>
 /// <returns>The updated component.</returns>
 /// <exception cref="WebServiceException">The caller is not logged in and does not have permission to edit components.</exception>
 public Component UpdateComponent(Uri componentUri, ComponentInput componentInput)
 {
     var helper = new ComponentInputWithProjectKey(null, componentInput);
     var json = ComponentInputWithProjectKeyJsonGenerator.Generate(helper);
     return client.Put<Component>(componentUri.ToString(), json);
 }