Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.storage;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalExtensionOnly;
import com.google.cloud.storage.multipartupload.model.AbortMultipartUploadRequest;
import com.google.cloud.storage.multipartupload.model.AbortMultipartUploadResponse;
Expand All @@ -38,9 +37,8 @@
* low-level interface for creating and managing multipart uploads.
*
* @see <a href="https://cloud.google.com/storage/docs/multipart-uploads">Multipart Uploads</a>
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
@InternalExtensionOnly
public abstract class MultipartUploadClient {

Expand All @@ -51,9 +49,8 @@ public abstract class MultipartUploadClient {
*
* @param request The request object containing the details for creating the multipart upload.
* @return A {@link CreateMultipartUploadResponse} object containing the upload ID.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public abstract CreateMultipartUploadResponse createMultipartUpload(
CreateMultipartUploadRequest request);

Expand All @@ -62,19 +59,17 @@ public abstract CreateMultipartUploadResponse createMultipartUpload(
*
* @param listPartsRequest The request object containing the details for listing the parts.
* @return A {@link ListPartsResponse} object containing the list of parts.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public abstract ListPartsResponse listParts(ListPartsRequest listPartsRequest);

/**
* Aborts a multipart upload.
*
* @param request The request object containing the details for aborting the multipart upload.
* @return An {@link AbortMultipartUploadResponse} object.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public abstract AbortMultipartUploadResponse abortMultipartUpload(
AbortMultipartUploadRequest request);

Expand All @@ -84,9 +79,8 @@ public abstract AbortMultipartUploadResponse abortMultipartUpload(
* @param request The request object containing the details for completing the multipart upload.
* @return A {@link CompleteMultipartUploadResponse} object containing information about the
* completed upload.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public abstract CompleteMultipartUploadResponse completeMultipartUpload(
CompleteMultipartUploadRequest request);

Expand All @@ -96,19 +90,17 @@ public abstract CompleteMultipartUploadResponse completeMultipartUpload(
* @param request The request object containing the details for uploading the part.
* @param requestBody The content of the part to upload.
* @return An {@link UploadPartResponse} object containing the ETag of the uploaded part.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public abstract UploadPartResponse uploadPart(UploadPartRequest request, RequestBody requestBody);

/**
* Lists all multipart uploads in a bucket.
*
* @param request The request object containing the details for listing the multipart uploads.
* @return A {@link ListMultipartUploadsResponse} object containing the list of multipart uploads.
* @since 2.61.0 This new api is in preview and is subject to breaking changes.
* @since 2.61.0
*/
@BetaApi
public abstract ListMultipartUploadsResponse listMultipartUploads(
ListMultipartUploadsRequest request);

Expand All @@ -117,9 +109,8 @@ public abstract ListMultipartUploadsResponse listMultipartUploads(
*
* @param config The configuration for the client.
* @return A new {@link MultipartUploadClient} instance.
* @since 2.60.0 This new api is in preview and is subject to breaking changes.
* @since 2.60.0
*/
@BetaApi
public static MultipartUploadClient create(MultipartUploadSettings config) {
HttpStorageOptions options = config.getOptions();
return new MultipartUploadClientImpl(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
*/
package com.google.cloud.storage;

import com.google.api.core.BetaApi;

/**
* Settings for configuring the {@link MultipartUploadClient}.
*
* <p>This class is for internal use only and is not intended for public consumption.
*/
@BetaApi
public final class MultipartUploadSettings {
private final HttpStorageOptions options;

Expand All @@ -35,7 +32,6 @@ private MultipartUploadSettings(HttpStorageOptions options) {
*
* @return The {@link HttpStorageOptions}.
*/
@BetaApi
public HttpStorageOptions getOptions() {
return options;
}
Expand All @@ -47,7 +43,6 @@ public HttpStorageOptions getOptions() {
* @param options The {@link HttpStorageOptions} to use.
* @return A new {@code MultipartUploadSettings} instance.
*/
@BetaApi
public static MultipartUploadSettings of(HttpStorageOptions options) {
return new MultipartUploadSettings(options);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

package com.google.cloud.storage;

import com.google.api.core.BetaApi;
import com.google.api.core.InternalExtensionOnly;
import java.io.IOException;
import java.nio.ByteBuffer;
Expand All @@ -30,7 +29,6 @@
* @see <a
* href="https://cloud.google.com/storage/docs/multipart-uploads#upload_parts">https://cloud.google.com/storage/docs/multipart-uploads#upload_parts</a>
*/
@BetaApi
@InternalExtensionOnly
public final class RequestBody {

Expand All @@ -45,25 +43,21 @@ RewindableContent getContent() {
}

/** Create a new empty RequestBody. */
@BetaApi
public static RequestBody empty() {
return new RequestBody(RewindableContent.empty());
}

/** Create a new RequestBody from the given {@link ByteBuffer}s. */
@BetaApi
public static RequestBody of(ByteBuffer... buffers) {
return new RequestBody(RewindableContent.of(buffers));
}

/** Create a new RequestBody from the given {@link ByteBuffer}s. */
@BetaApi
public static RequestBody of(ByteBuffer[] srcs, int srcsOffset, int srcsLength) {
return new RequestBody(RewindableContent.of(srcs, srcsOffset, srcsLength));
}

/** Create a new RequestBody from the given {@link Path}. */
@BetaApi
public static RequestBody of(Path path) throws IOException {
return new RequestBody(RewindableContent.of(path));
}
Expand Down