code: public boolean validation() throws ParallelTaskInvalidException {
  
          if (this.commandLine == null) {
              throw new ParallelTaskInvalidException(
                      "commandSshLine is null for ssh");
          }
          if (this.sshLoginType == null) {
              throw new ParallelTaskInvalidException(
                      "sshLoginType is null for ssh");
          }
  
          if (this.userName == null) {
              throw new ParallelTaskInvalidException("userName is null for ssh. "
                      + "UserName is required for both key/password based login");
          }
  
  
          if (this.sshLoginType == SshLoginType.PASSWORD && password == null) {
              throw new ParallelTaskInvalidException(
                      "use password but it is null for ssh");
          }
          if (this.sshLoginType == SshLoginType.KEY
                  && this.privKeyRelativePath == null) {
              throw new ParallelTaskInvalidException(
                      "use public key but private key path is null for ssh");
          }
  
          if (this.sshLoginType == SshLoginType.KEY
                  && this.privKeyUsePassphrase && this.passphrase == null) {
              throw new ParallelTaskInvalidException(
                      "use public key and also with private key passphrase but it is null for ssh");
          }
  
          return true;
  
      }
docs: Validation.
  
  @return true, if successful
  @throws ParallelTaskInvalidException
  the parallel task invalid exception