code: public GlobalSecondaryIndex globalSecondaryIndex(final String indexName) {
          if (!globalSecondaryIndexes.containsKey(indexName)) {
              return null;
          }
          final GlobalSecondaryIndex gsi = globalSecondaryIndexes.get(indexName);
          final GlobalSecondaryIndex copy = new GlobalSecondaryIndex().withIndexName(gsi.getIndexName());
          copy.withProjection(new Projection().withProjectionType(gsi.getProjection().getProjectionType()));
          for (final KeySchemaElement key : gsi.getKeySchema()) {
              copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
          }
          return copy;
      }
docs: Gets the global secondary index.
  @param indexName The index name.
  @return The global secondary index or null.