def EnableServiceApiCall(client, messages, project_id, service_name):
  """Make API call to enable a specific API."""

  # Shorten the patch request name for better readability
  patch_request = messages.ServicemanagementServicesProjectSettingsPatchRequest

  usage_settings = messages.UsageSettings(
      consumerEnableStatus=(messages.UsageSettings
                            .ConsumerEnableStatusValueValuesEnum.ENABLED))

  project_settings = messages.ProjectSettings(usageSettings=usage_settings)

  request = patch_request(
      serviceName=service_name,
      consumerProjectId=project_id,
      projectSettings=project_settings,
      updateMask='usage_settings.consumer_enable_status')

  return client.services_projectSettings.Patch(request)