Returns a builder that can be used to build requests for client credential grants. <br>
Requires client ID and client secret to be set.

@return A {@link ClientCredentialsRequest.Builder}.
770671
public ClientCredentialsRequest.Builder clientCredentials() {
    return new ClientCredentialsRequest.Builder(clientId, clientSecret)
            .setDefaults(httpManager, scheme, host, port)
            .grant_type("client_credentials");
  }
705096
public T build() {
        C clientObject = client;
        if (clientObject == null) {
            clientObject = createClient();
        }

        return factory.create(clientObject);
    }
77373
public <T extends AbstractGoogleJsonClient.Builder> T fromClientSecretsFile(T builder,
      File clientSecretsJson) {
    Preconditions.checkNotNull(builder);
    Preconditions.checkNotNull(clientSecretsJson);
    return prepareBuilder(builder,
        CredentialFactory.getCredentialFromClientSecrets(clientSecretsJson.getAbsolutePath(),
            applicationName),
        null);
  }
1284393
public OCSPReq build() throws OCSPException, IOException, CertificateEncodingException {
        SecureRandom generator = checkNotNull(this.generator, "generator");
        DigestCalculator calculator = checkNotNull(this.calculator, "calculator");
        X509Certificate certificate = checkNotNull(this.certificate, "certificate");
        X509Certificate issuer = checkNotNull(this.issuer, "issuer");

        BigInteger serial = certificate.getSerialNumber();

        CertificateID certId = new CertificateID(calculator,
                new X509CertificateHolder(issuer.getEncoded()), serial);

        OCSPReqBuilder builder = new OCSPReqBuilder();
        builder.addRequest(certId);

        byte[] nonce = new byte[8];
        generator.nextBytes(nonce);

        Extension[] extensions = new Extension[] {
                new Extension(OCSPObjectIdentifiers.id_pkix_ocsp_nonce, false,
                        new DEROctetString(nonce)) };

        builder.setRequestExtensions(new Extensions(extensions));

        return builder.build();
    }
369004
public <T> HttpClientRequest.Builder<T> options(final URI uri, final HttpClientResponseHandler<T> httpHandler)
    {
        return new HttpClientRequest.Builder<T>(httpClientFactory, HttpClientMethod.OPTIONS, uri, httpHandler);
    }
519528
public Client build(final ZipkinClientConfiguration configuration) {
    final Client client =
        new JerseyClientBuilder(environment)
            .using(configuration)
            .build(configuration.getServiceName());
    return build(client);
  }
1175277
public static Builder builder() {
    return new AutoValue_MapboxDirections.Builder()
      .baseUrl(Constants.BASE_API_URL)
      .profile(DirectionsCriteria.PROFILE_DRIVING)
      .user(DirectionsCriteria.PROFILE_DEFAULT_USER)
      .geometries(DirectionsCriteria.GEOMETRY_POLYLINE6);
  }
1306709
@Beta
  public GoogleCredential createDelegated(String user) {
    if (serviceAccountPrivateKey == null) {
      return this;
    }
    return toBuilder()
        .setServiceAccountUser(user)
        .build();
  }
382524
public com.google.privacy.dlp.v2.TransientCryptoKeyOrBuilder getTransientOrBuilder() {
    if (sourceCase_ == 1) {
      return (com.google.privacy.dlp.v2.TransientCryptoKey) source_;
    }
    return com.google.privacy.dlp.v2.TransientCryptoKey.getDefaultInstance();
  }
946374
public static Builder builder() {
    return new AutoValue_OfflineDownloadOptions.Builder()
      .uuid(UUID.randomUUID().getMostSignificantBits())
      .metadata(new byte[] {})
      .progress(0);
    // TODO user must provide a notificationOptions object
  }
507534
static ClientAssertion buildJwt(final AsymmetricKeyCredential credential,
            final String jwtAudience) throws AuthenticationException {
        if (credential == null) {
            throw new IllegalArgumentException("credential is null");
        }

        final long time = System.currentTimeMillis();

        final JWTClaimsSet claimsSet = new JWTClaimsSet.Builder()
                .audience(Collections.singletonList(jwtAudience))
                .issuer(credential.getClientId())
                .jwtID(UUID.randomUUID().toString())
                .notBeforeTime(new Date(time))
                .expirationTime(new Date(time
                                + AuthenticationConstants.AAD_JWT_TOKEN_LIFETIME_SECONDS
                                * 1000))
                .subject(credential.getClientId())
                .build();

        SignedJWT jwt;
        try {
            JWSHeader.Builder builder = new Builder(JWSAlgorithm.RS256);
            List<Base64> certs = new ArrayList<Base64>();
            certs.add(new Base64(credential.getPublicCertificate()));
            builder.x509CertChain(certs);
            builder.x509CertThumbprint(new Base64URL(credential
                    .getPublicCertificateHash()));
            jwt = new SignedJWT(builder.build(), claimsSet);
            final RSASSASigner signer = new RSASSASigner(credential.getKey());

            jwt.sign(signer);
        }
        catch (final Exception e) {
            throw new AuthenticationException(e);
        }

        return new ClientAssertion(jwt.serialize());
    }
885212
public Builder toBuilder() {
		return builder()
			.name(_name)
			.cmt(_comment)
			.desc(_description)
			.src(_source)
			.links(_links)
			.number(_number)
			.points(_points);
	}
182215
public MucEnterConfiguration.Builder getEnterConfigurationBuilder(Resourcepart nickname) {
        return new MucEnterConfiguration.Builder(nickname, connection.getReplyTimeout());
    }
171457
public <T> T build(final AwsClientBuilder builder, final Class<T> clientType) {
        val cfg = new ClientConfiguration();
        try {
            val localAddress = getSetting("localAddress");
            if (StringUtils.isNotBlank(localAddress)) {
                cfg.setLocalAddress(InetAddress.getByName(localAddress));
            }
        } catch (final Exception e) {
            LOGGER.error(e.getMessage(), e);
        }
        builder.withClientConfiguration(cfg);

        val key = getSetting("credentialAccessKey");
        val secret = getSetting("credentialSecretKey");
        val credentials = ChainingAWSCredentialsProvider.getInstance(key, secret);
        builder.withCredentials(credentials);

        var region = getSetting("region");
        val currentRegion = Regions.getCurrentRegion();
        if (currentRegion != null && StringUtils.isBlank(region)) {
            region = currentRegion.getName();
        }
        var regionOverride = getSetting("regionOverride");
        if (currentRegion != null && StringUtils.isNotBlank(regionOverride)) {
            regionOverride = currentRegion.getName();
        }
        val finalRegion = StringUtils.defaultIfBlank(regionOverride, region);
        if (StringUtils.isNotBlank(finalRegion)) {
            builder.withRegion(finalRegion);
        }

        val endpoint = getSetting("endpoint");
        if (StringUtils.isNotBlank(endpoint)) {
            builder.withEndpointConfiguration(new AwsClientBuilder.EndpointConfiguration(endpoint, finalRegion));
        }

        val result = builder.build();
        return clientType.cast(result);
    }
885402
public static<T> ServiceInstanceBuilder<T>builder() throws Exception
    {
        String                  address = null;
        Collection<InetAddress> ips = ServiceInstanceBuilder.getAllLocalIPs();
        if ( ips.size() > 0 )
        {
            address = ips.iterator().next().getHostAddress();   // default to the first address
        }

        String                  id = UUID.randomUUID().toString();

        return new ServiceInstanceBuilder<T>().address(address).id(id).registrationTimeUTC(System.currentTimeMillis());
    }
1150106
public Builder newBuilder() {
        return new Builder()
                .name(name)
                .addColumn(columns)
                .addFk(fks)
                .pkFields(pkFields)
                .addIndexes(indexes);
    }
1018173
public OAuthFlow build() {
        if(httpClient == null){
            httpClient = new DefaultHttpClient();
        }

        if(tokenURL == null){
            tokenURL = DEFAULT_TOKEN_URL;
        }

        if(authorizationURL == null){
            authorizationURL = DEFAULT_AUTHORIZATION_URL;
        }

        if(jsonSerializer == null){
            jsonSerializer = new JacksonJsonSerializer();
        }

        if(clientId == null || clientSecret == null || redirectURL == null){
            throw new IllegalStateException();
        }

        return new OAuthFlowImpl(clientId, clientSecret, redirectURL, authorizationURL, tokenURL, httpClient,
                jsonSerializer);
    }