code: public TableKeysAndAttributes withPrimaryKeys(PrimaryKey... primaryKeys) {
          if (primaryKeys == null)
              this.primaryKeys = null;
          else {
              Set<String> pkNameSet = null;
              for (PrimaryKey pk : primaryKeys) {
                  if (pkNameSet == null)
                      pkNameSet = pk.getComponentNameSet();
                  else {
                      if (!pkNameSet.equals(pk.getComponentNameSet())) {
                          throw new IllegalArgumentException(
                              "primary key attribute names must be consistent for the specified primary keys");
                      }
                  }
              }
              this.primaryKeys = new ArrayList<PrimaryKey>(Arrays.asList(primaryKeys));
          }
          return this;
      }
docs: Used to specify multiple primary keys. A primary key could consist of
  either a hash-key or both a hash-key and a range-key depending on the
  schema of the table.