Returns iterator over all {@link BoxWebHook}-s.

@param api
the API connection to be used by the resource
@param fields
the fields to retrieve.
@return existing {@link BoxWebHook.Info}-s
977269
public static Iterable<BoxWebHook.Info> all(final BoxAPIConnection api, String ... fields) {
        QueryStringBuilder builder = new QueryStringBuilder();
        if (fields.length > 0) {
            builder.appendParam("fields", fields);
        }
        return new BoxResourceIterable<BoxWebHook.Info>(
                api, WEBHOOKS_URL_TEMPLATE.buildWithQuery(api.getBaseURL(), builder.toString()), 64) {

            @Override
            protected BoxWebHook.Info factory(JsonObject jsonObject) {
                BoxWebHook webHook = new BoxWebHook(api, jsonObject.get("id").asString());
                return webHook.new Info(jsonObject);
            }

        };
    }
435105
public DocumentationBuilder apiListingsByResourceGroupName(Map<String, List<ApiListing>> apiListings) {
    nullToEmptyMultimap(apiListings).entrySet().stream().forEachOrdered(entry -> {
      List<ApiListing> list;
      if (this.apiListings.containsKey(entry.getKey())) {
        list = this.apiListings.get(entry.getKey());
        list.addAll(entry.getValue());
      } else {
        list = new ArrayList<>(entry.getValue());
        this.apiListings.put(entry.getKey(), list);
      }
      list.sort(byListingPosition());
    });
    return this;
  }
389407
protected String createSortQuery(final List<DefaultKeyValue<String, Boolean>> fields) {
        StringBuilder builder = new StringBuilder("{");
        Iterator<DefaultKeyValue<String, Boolean>> iter = fields.iterator();
        while (iter.hasNext()) {
            DefaultKeyValue<String, Boolean> field = iter.next();
            builder.append("\"");
            builder.append(field.getKey());
            builder.append("\"");
            builder.append(":");
            if (field.getValue()) {
                builder.append(1);
            } else {
                builder.append(-1);
            }
            if (iter.hasNext()) {
                builder.append(",");
            }
        }
        builder.append("}");
        return builder.toString();
    }
512165
public static List<Object> getFieldValues(Iterable<?> collection, final String fieldName) {
		return getFieldValues(collection, fieldName, false);
	}
1219841
public ApiResponse<InlineResponse200> getCallsWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getCallsValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<InlineResponse200>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
150860
public ApiResponse<GetInboundResponse> getInboundSettingsWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getInboundSettingsValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<GetInboundResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
1298679
public static List<JBBPAbstractField> fieldsAsList(final JBBPAbstractField... fields) {
    final List<JBBPAbstractField> result = new ArrayList<>();
    Collections.addAll(result, fields);
    return result;
  }
128642
public Iterator<BoxItem.Info> iterator() {
        URL url = GET_ITEMS_URL.build(this.api.getBaseURL());
        return new BoxItemIterator(this.api, url);
    }
646352
public FieldList setHandle(Object bookmark, int iHandleType) throws DBException
    {
        if ((iHandleType == DBConstants.OBJECT_ID_HANDLE) || (iHandleType == DBConstants.BOOKMARK_HANDLE))
        {
            BaseTable table = null;
            Object strTable = this.getInfoFromHandle(bookmark, true, iHandleType);
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                table = iterator.next();
                if (strTable.equals(table.getRecord().getHandle(DBConstants.OBJECT_SOURCE_HANDLE)))
                    break;
            }
            bookmark = this.getInfoFromHandle(bookmark, false, iHandleType);
            this.setCurrentTable(table);
        }
        else if (iHandleType == DBConstants.DATA_SOURCE_HANDLE)
        {
            BaseTable table = ((FullDataSource)bookmark).getTable();
            bookmark = ((FullDataSource)bookmark).getDataSource();
            this.setCurrentTable(table);
        }
        FieldList record = null;
        BaseTable table = this.getCurrentTable();
        if (table != null)
            record = table.setHandle(bookmark, iHandleType);
        else
            record = null;
        this.syncCurrentToBase();
        return record;
    }
425382
@Override
  public BindingBuilder<T> to(Class<? super T> api)
  {
    Objects.requireNonNull(api);
    
    _api = api;
    
    _builder.to(api);

    return this;
  }
981200
@Deprecated
    public static BoxItem createBoxItemFromJson(final String json) {
        BoxEntity createdByEntity = new BoxEntity();
        createdByEntity.createFromJson(json);
        if (createdByEntity.getType().equals(BoxFile.TYPE)) {
            BoxFile file = new BoxFile();
            file.createFromJson(json);
            return file;
        } else if (createdByEntity.getType().equals(BoxBookmark.TYPE)) {
            BoxBookmark bookmark = new BoxBookmark();
            bookmark.createFromJson(json);
            return bookmark;
        } else if (createdByEntity.getType().equals(BoxFolder.TYPE)) {
            BoxFolder folder = new BoxFolder();
            folder.createFromJson(json);
            return folder;

        }
        return null;
    }
342849
public KeyedStream<T, Tuple> keyBy(int... fields) {
		if (getType() instanceof BasicArrayTypeInfo || getType() instanceof PrimitiveArrayTypeInfo) {
			return keyBy(KeySelectorUtil.getSelectorForArray(fields, getType()));
		} else {
			return keyBy(new Keys.ExpressionKeys<>(fields, getType()));
		}
	}
842663
public Iterable<DContact> queryByFacebook(Object parent, java.lang.String facebook) {
    return queryByField(parent, DContactMapper.Field.FACEBOOK.getFieldName(), facebook);
  }
65503
public ApiResponse<String> getPingWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getPingValidateBeforeCall(null);
        Type localVarReturnType = new TypeToken<String>() {
        }.getType();
        return apiClient.execute(call, localVarReturnType);
    }
263436
public ApiResponse<GetSubResponse> getSubWithHttpInfo() throws ApiException {
        com.squareup.okhttp.Call call = getSubValidateBeforeCall(null, null);
        Type localVarReturnType = new TypeToken<GetSubResponse>(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }
564743
protected Api getApi(String id) throws IOException {
        Get get = new Get.Builder(getIndexName(), id).type("api").build(); //$NON-NLS-1$
        JestResult result = getClient().execute(get);
        if (result.isSucceeded()) {
            Api api = result.getSourceAsObject(Api.class);
            return api;
        } else {
            return null;
        }
    }
407319
public Iterable<BoxItem.Info> getChildren(final String... fields) {
        return new Iterable<BoxItem.Info>() {
            @Override
            public Iterator<BoxItem.Info> iterator() {
                String queryString = new QueryStringBuilder().appendParam("fields", fields).toString();
                URL url = GET_ITEMS_URL.buildWithQuery(getAPI().getBaseURL(), queryString, getID());
                return new BoxItemIterator(getAPI(), url);
            }
        };
    }