/**
  * Validates the user and throws a validation error if there are any errors.
  * @throws ValidationException if there are any validation errors
  */
 public function ValidateUser()
 {
     if ($this->GetOAuth2Info() === null) {
         throw new ValidationException('OAuth2Info', null, 'OAuth 2.0 configuration is required.');
     }
     parent::ValidateOAuth2Info();
     if ($this->GetUserAgent() === null || trim($this->GetUserAgent()) === '' || strpos($this->GetUserAgent(), self::DEFAULT_USER_AGENT) !== false) {
         throw new ValidationException('userAgent', null, sprintf("The property userAgent is required and cannot be " . "null, the empty string, or the default [%s]", self::DEFAULT_USER_AGENT));
     }
     if ($this->GetDeveloperToken() === null) {
         throw new ValidationException('developerToken', null, 'developerToken is required and cannot be null.');
     }
 }