Check if OpenShift API Groups are available
@param client   The client.
@return         True if the new <code>/apis/*.openshift.io/</code> APIs are found in the root paths.
330099
static boolean isOpenShiftAPIGroups(Client client) {
        Config configuration = client.getConfiguration();
        if (configuration instanceof OpenShiftConfig) {
            OpenShiftConfig openShiftConfig = (OpenShiftConfig) configuration;
            if (openShiftConfig.isDisableApiGroupCheck()) {
                return false;
            }
        }
        URL masterUrl = client.getMasterUrl();
        if (isOpenShift(client) && USES_OPENSHIFT_APIGROUPS.containsKey(masterUrl)) {
            return USES_OPENSHIFT_APIGROUPS.get(masterUrl);
        }
        return false;
    }
151305
protected void configureLinkedInClient(final Collection<BaseClient> properties) {
        val ln = pac4jProperties.getLinkedIn();
        if (StringUtils.isNotBlank(ln.getId()) && StringUtils.isNotBlank(ln.getSecret())) {
            val client = new LinkedIn2Client(ln.getId(), ln.getSecret());
            configureClient(client, ln);

            if (StringUtils.isNotBlank(ln.getScope())) {
                client.setScope(ln.getScope());
            }

            if (StringUtils.isNotBlank(ln.getFields())) {
                client.setFields(ln.getFields());
            }
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
14452
public static boolean isExplodeRequires(HttpServletRequest request) {
		if (isIncludeRequireDeps(request)) {
			// don't expand require deps if we're including them in the response.
			return false;
		}
		boolean result = false;
		IAggregator aggr = (IAggregator)request.getAttribute(IAggregator.AGGREGATOR_REQATTRNAME);
		IOptions options = aggr.getOptions();
		IConfig config = aggr.getConfig();
		Boolean reqattr = TypeUtil.asBoolean(request.getAttribute(IHttpTransport.EXPANDREQUIRELISTS_REQATTRNAME));
		result = (options == null || !options.isDisableRequireListExpansion())
				&& (config == null || !isServerExpandedLayers(request))
				&& reqattr != null && reqattr;
		return result;
	}
998534
public T execute(HyperionClient client)
    {
        EntityList<T> entityResponse = client.update(build());
        List<T> entries = entityResponse.getEntries();
        return entries.size() == 0 ? null : entries.get(0);
    }
630885
def is_disabled?
        client = RestClient.where(:api_key => @http_headers[@@header_api_key]).first
        return true if client.nil?
        return false if client.is_disabled.nil?
        client.is_disabled
      end
681761
private static String getKunderaClientToLookupClass(String client)
    {

        Datasource datasource;
        try
        {
            datasource = Datasource.valueOf(client.toUpperCase());
        }
        catch (IllegalArgumentException ex)
        {
            LOGGER.error(client + " is not supported!", ex);
            throw new KunderaException(client + " is not supported!", ex);
        }

        return clientNameToFactoryMap.get(datasource);
    }
1142044
protected void configureGitHubClient(final Collection<BaseClient> properties) {
        val github = pac4jProperties.getGithub();
        if (StringUtils.isNotBlank(github.getId()) && StringUtils.isNotBlank(github.getSecret())) {
            val client = new GitHubClient(github.getId(), github.getSecret());
            configureClient(client, github);

            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
117980
public function verifyStackExists($stackName, $organization, OutputInterface $output, Image $client = null)
    {
        if (!$client) {
            $client = $this->clientProvider->getImageClient($organization);
        }

        if (!$stackName || !$this->rokkaHelper->stackExists($client, $stackName, $organization)) {
            $output->writeln(
                $this->formatterHelper->formatBlock([
                    'Error!',
                    'Stack "'.$stackName.'"  does not exist on "'.$organization.'" organization!',
                ], 'error', true)
            );

            return false;
        }

        return true;
    }
812141
public boolean hasRequiredClientProps() {
    boolean valid = true;
    valid &= verifyStringPropSet(CONNECTION_APPLICATION_NAME_PROP, CLIENT_APPLICATION_NAME_PROP);
    valid &= verifyStringPropSet(ACCUMULO_USER_PROP, CLIENT_ACCUMULO_USER_PROP);
    valid &= verifyStringPropSet(ACCUMULO_PASSWORD_PROP, CLIENT_ACCUMULO_PASSWORD_PROP);
    valid &= verifyStringPropSet(ACCUMULO_INSTANCE_PROP, CLIENT_ACCUMULO_INSTANCE_PROP);
    return valid;
  }
308842
async def is_cn(self, client):
        
        node_pyxb = await client.get_capabilities()
        return d1_common.type_conversions.pyxb_get_type_name(node_pyxb) == "NodeList"
53946
public boolean syncServers(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the server configuration using the REST API
        if(cache.isServersEnabled())
        {
            ret = false;

            logger.info("Getting the servers");
            cache.servers().add(apiClient.servers().list());
            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
1368657
public List<T> execute(HyperionClient client)
    {
        EntityList<T> response = client.create(build());
        return response.getEntries();
    }
930672
@Deprecated
	public static boolean isIndexExist(Client client, String index) {
		return client.admin().indices().prepareExists(index).get().isExists();
	}
1232966
public boolean hasPermission(final ApiKey apiKey, String permissionName) {
        if (apiKey.getTeams() == null) {
            return false;
        }
        for (final Team team: apiKey.getTeams()) {
            final List<Permission> teamPermissions = getObjectById(Team.class, team.getId()).getPermissions();
            for (final Permission permission: teamPermissions) {
                if (permission.getName().equals(permissionName)) {
                    return true;
                }
            }
        }
        return false;
    }
1135574
public boolean syncPlugins(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the Plugins configuration using the REST API
        if(cache.isPluginsEnabled())
        {
            ret = false;

            logger.info("Getting the plugins");
            Collection<Plugin> plugins = apiClient.plugins().list(true);
            for(Plugin plugin : plugins)
            {
                cache.plugins().add(plugin);

                logger.fine("Getting the components for plugin: "+plugin.getId());
                Collection<PluginComponent> components = apiClient.pluginComponents().list(PluginComponentService.filters().pluginId(plugin.getId()).build());
                cache.plugins().components(plugin.getId()).add(components);
            }

            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
1113256
public void getOnlineClients(List<String> clients, final AVIMOnlineClientsCallback callback) {
    InternalConfiguration.getOperationTube().queryOnlineClients(this.clientId, clients, callback);
  }
1003698
public static boolean isIndexExist(RestClient client, String index) throws Exception {
		Response response = client.performRequest(new Request("HEAD", "/" + index));
		return response.getStatusLine().getStatusCode() == 200;
	}