/** * Copy method to populate the builder with values from the given instance. * @return this builder instance */ public Builder copy(AbortMultipartUploadRequest o) { namespaceName(o.getNamespaceName()); bucketName(o.getBucketName()); objectName(o.getObjectName()); uploadId(o.getUploadId()); opcClientRequestId(o.getOpcClientRequestId()); invocationCallback(o.getInvocationCallback()); return this; }
/** * Build the instance of AbortMultipartUploadRequest as configured by this builder * * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#buildWithoutInvocationCallback} does not. * * This is the preferred method to build an instance. * * @return instance of AbortMultipartUploadRequest */ public AbortMultipartUploadRequest build() { AbortMultipartUploadRequest request = buildWithoutInvocationCallback(); request.setInvocationCallback(invocationCallback); return request; } }
/** * Aborts the current multi-part assembly and all uploads * that are currently in progress. * @return */ public AbortMultipartUploadResponse abort() { // allow aborted calls to call abort again (in case the first call // failed) validateState(true); transferManager.abortAll(); // always mark upload as aborted to prevent any more parts // from being added, even if the actual abort call fails manifest.markUploadAborted(); return service.abortMultipartUpload( AbortMultipartUploadRequest.builder() .namespaceName(namespaceName) .bucketName(bucketName) .objectName(objectName) .uploadId(manifest.getUploadId()) .opcClientRequestId(createClientRequestId("-abort")) .build()); }
public static com.oracle.bmc.http.internal.WrappedInvocationBuilder fromRequest( com.oracle.bmc.http.internal.RestClient client, AbortMultipartUploadRequest 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.notBlank(request.getObjectName(), "objectName must not be blank"); Validate.notNull(request.getUploadId(), "uploadId is required"); .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getNamespaceName())) .path("b") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getBucketName())) .path("u") .path( com.oracle.bmc.util.internal.HttpUtils.encodePathSegment( request.getObjectName())); "uploadId", com.oracle.bmc.util.internal.HttpUtils.attemptEncodeQueryParam( request.getUploadId())); if (request.getOpcClientRequestId() != null) { ib.header("opc-client-request-id", request.getOpcClientRequestId());