Returns all the retention policies.
@param api the API connection to be used by the resource.
@param fields the fields to retrieve.
@return an iterable with all the retention policies.
18062
public static Iterable<BoxRetentionPolicy.Info> getAll(final BoxAPIConnection api, String ... fields) {
        return getAll(null, null, null, DEFAULT_LIMIT, api, fields);
    }
921944
List<ApiImplementor> getApiImplementors() {
        if (apiImplementors == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(apiImplementors);
    }
589867
public static JMapAccessor getFieldAccessors(Class<?> clazz, Field field){
		return getFieldAccessors(clazz,field,false, field.getName(),Constants.DEFAULT_FIELD_VALUE);
	}
1029522
public Bucket lockRetentionPolicy(String bucketName) throws StorageException {
    // [START storage_lock_retention_policy]
    // Instantiate a Google Cloud Storage client
    Storage storage = StorageOptions.getDefaultInstance().getService();

    // The name of a bucket, e.g. "my-bucket"
    // String bucketName = "my-bucket";

    Bucket bucket =
        storage.get(bucketName, Storage.BucketGetOption.fields(BucketField.METAGENERATION));
    Bucket lockedBucket =
        bucket.lockRetentionPolicy(Storage.BucketTargetOption.metagenerationMatch());

    System.out.println("Retention period for " + bucketName + " is now locked");
    System.out.println(
        "Retention policy effective as of " + new Date(lockedBucket.getRetentionEffectiveTime()));
    // [END storage_lock_retention_policy]
    return lockedBucket;
  }
314507
private List<Field> getList(Map<Class<?>, List<Field>> fields) {
        List<Field> ret = fields == null ? null : fields.get(getServiceClass());
        if (ret != null) {
            ret = Collections.unmodifiableList(ret);
        } else {
            ret = Collections.emptyList();
        }
        return ret;
    }
606896
public static List<ApiImplementor> getAllImplementors() {
		List<ApiImplementor> imps = new ArrayList<>();
		
		ApiImplementor api;

		imps.add(new AlertAPI(null));

		api = new AntiCsrfAPI(null);
		api.addApiOptions(new AntiCsrfParam());
		imps.add(api);
		
		imps.add(new PassiveScanAPI(null));
		imps.add(new SearchAPI(null));

		api = new AutoUpdateAPI(null);
		api.addApiOptions(new OptionsParamCheckForUpdates());
		imps.add(api);

		api = new SpiderAPI(null);
		api.addApiOptions(new SpiderParam());
		imps.add(api);

		api = new CoreAPI(new ConnectionParam());
		imps.add(api);

		imps.add(new ParamsAPI(null));
		
		api = new ActiveScanAPI(null);
		api.addApiOptions(new ScannerParam());
		imps.add(api);

        imps.add(new ContextAPI());
		
		imps.add(new HttpSessionsAPI(null));
		
		imps.add(new BreakAPI(null));
		
		imps.add(new AuthenticationAPI(null));
		
		imps.add(new AuthorizationAPI());

		imps.add(new SessionManagementAPI(null));
		
		imps.add(new UsersAPI(null));
		
		imps.add(new ForcedUserAPI(null));

		imps.add(new ScriptAPI(null));

		api = new StatsAPI(null);
		api.addApiOptions(new StatsParam());
		imps.add(api);

		return imps;
	}
839640
async def list(cls, fields: Iterable[str] = None) -> Sequence[dict]:
        '''
        
        '''
        if fields is None:
            fields = (
                'name', 'created_at',
                'total_resource_slots', 'max_concurrent_sessions',
                'max_vfolder_count', 'max_vfolder_size',
                'idle_timeout',
            )
        q = 'query {' \
            '  keypair_resource_policies {' \
            '    $fields' \
            '  }' \
            '}'
        q = q.replace('$fields', ' '.join(fields))
        rqst = Request(cls.session, 'POST', '/admin/graphql')
        rqst.set_json({
            'query': q,
        })
        async with rqst.fetch() as resp:
            data = await resp.json()
            return data['keypair_resource_policies']
809459
public Iterable<BoxRetentionPolicyAssignment.Info> getEnterpriseAssignments(int limit, String ... fields) {
        return this.getAssignments(BoxRetentionPolicyAssignment.TYPE_ENTERPRISE, limit, fields);
    }
144308
public <R, RK> List<R> fetch(Collection<DBRef<R, RK>> collection, DBObject fields) {
        Map<JacksonCollectionKey, List<Object>> collectionsToIds = new HashMap<JacksonCollectionKey, List<Object>>();
        for (DBRef<R, RK> ref : collection) {
            if (ref instanceof FetchableDBRef) {
                JacksonCollectionKey key = ((FetchableDBRef) ref).getCollectionKey();
                List<Object> ids = collectionsToIds.get(key);
                if (ids == null) {
                    ids = new ArrayList<Object>();
                    collectionsToIds.put(key, ids);
                }
                ids.add(getReferenceCollection(key).convertToDbId(ref.getId()));
            }
        }
        List<R> results = new ArrayList<R>();
        for (Map.Entry<JacksonCollectionKey, List<Object>> entry : collectionsToIds.entrySet()) {
            for (R result : this.<R, RK>getReferenceCollection(entry.getKey()).find(
                    new QueryBuilder().put("_id").in(entry.getValue()).get(), fields)) {
                results.add(result);
            }
        }
        return results;
    }
960512
private static Collection<Field> getAllFields(Class<?> type) {
    final Collection<Field> allFields = new ArrayList<>();

    while (type != Object.class) {
      Collections.addAll(allFields, type.getDeclaredFields());
      type = type.getSuperclass();
    }

    return Collections.unmodifiableCollection(allFields);
  }
151439
private String getApiId(Api api) {
        return getApiId(api.getOrganizationId(), api.getApiId(), api.getVersion());
    }
9499
private static List<Field> getAllFieldsRec(Class clazz, List<Field> fieldList) {
        Class superClazz = clazz.getSuperclass();
        if (superClazz != null) {
            getAllFieldsRec(superClazz, fieldList);
        }
        fieldList.addAll(ArrayUtil.toList(clazz.getDeclaredFields(), Field.class));
        return fieldList;
    }
1317324
public long remove(final String... fields) {
        return doWithJedis(new JedisCallable<Long>() {
            @Override
            public Long call(Jedis jedis) {
                return jedis.hdel(getKey(), fields);
            }
        });
    }
211287
public static List<Field> getAllFields(Class<?> clas) {
		JK.fixMe("add caching..");
		List<Field> list = new Vector<>();
		// start by fields from the super class
		if (clas.getSuperclass() != null) {
			list.addAll(getAllFields(clas.getSuperclass()));
		}
		Field[] fields = clas.getDeclaredFields();
		for (Field field : fields) {
			if (!Modifier.isStatic(field.getModifiers())) {
				list.add(field);
			}
		}
		return list;
	}
1259779
@Override
  public List<ApiType> list() {
    lock.lock();
    try {
      List<ApiType> itemList = new ArrayList<>(this.items.size());
      for (Map.Entry<String, ApiType> entry : this.items.entrySet()) {
        itemList.add(entry.getValue());
      }
      return itemList;
    } finally {
      lock.unlock();
    }
  }
1324777
private static List<Field> getAllDeclaredFields(final Class<?> sourceEntity) {
        List<Field> fields = new ArrayList<Field>();
        Class<?> clazz = sourceEntity;
        while (clazz != null) {
            Field[] f = clazz.getDeclaredFields();
            fields.addAll(Arrays.asList(f));
            clazz = clazz.getSuperclass();
        }
        return fields;
    }
1161093
private List<Field> getAllFields() {
    List<Field> allFields = new ArrayList<>();
    Class<?> clazz = entityClass;
    boolean stop;
    do {
      List<Field> fields = IntrospectionUtils.getPersistableFields(clazz);
      allFields.addAll(fields);
      clazz = clazz.getSuperclass();
      stop = clazz == null || !clazz.isAnnotationPresent(MappedSuperClass.class);
    } while (!stop);
    return allFields;
  }