public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest(
com.oracle.bmc.http.internal.RestClient client, HeadBucketRequest request) {
Validate.notNull(request, "request instance is required");
Validate.notBlank(request.getNamespaceName(), "namespaceName must not be blank");
Validate.notBlank(request.getBucketName(), "bucketName must not be blank");
com.oracle.bmc.http.internal.WrappedWebTarget target =
client.getBaseTarget()
.path("/")
.path("n")
.path(
com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
request.getNamespaceName()))
.path("b")
.path(
com.oracle.bmc.util.internal.HttpUtils.encodePathSegment(
request.getBucketName()));
com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request();
ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON);
if (request.getIfMatch() != null) {
ib.header("if-match", request.getIfMatch());
}
if (request.getIfNoneMatch() != null) {
ib.header("if-none-match", request.getIfNoneMatch());
}
if (request.getOpcClientRequestId() != null) {
ib.header("opc-client-request-id", request.getOpcClientRequestId());
}
return ib;
}