public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, RenameObjectRequest 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"); Validate.notNull(request.getRenameObjectDetails(), "renameObjectDetails is required"); 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())) .path("actions") .path("renameObject"); com.oracle.bmc.http.internal.WrappedInvocationBuilder ib = target.request(); ib.accept(javax.ws.rs.core.MediaType.APPLICATION_JSON); if (request.getOpcClientRequestId() != null) { ib.header("opc-client-request-id", request.getOpcClientRequestId()); } return ib; }
/** * Copy method to populate the builder with values from the given instance. * @return this builder instance */ public Builder copy(RenameObjectRequest o) { namespaceName(o.getNamespaceName()); bucketName(o.getBucketName()); renameObjectDetails(o.getRenameObjectDetails()); opcClientRequestId(o.getOpcClientRequestId()); invocationCallback(o.getInvocationCallback()); return this; }