Skip to content

Commit 6d104fa

Browse files
authored
chore: Remove @BetaApi Annotations for Transfer Manager operations (#2529)
1 parent b84654e commit 6d104fa

10 files changed

+0
-101
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/DownloadJob.java

-9
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020

2121
import com.google.api.core.ApiFuture;
2222
import com.google.api.core.ApiFutures;
23-
import com.google.api.core.BetaApi;
2423
import com.google.api.gax.rpc.ApiExceptions;
2524
import com.google.common.base.MoreObjects;
2625
import com.google.common.collect.ImmutableList;
@@ -34,7 +33,6 @@
3433
*
3534
* @see Builder
3635
*/
37-
@BetaApi
3836
public final class DownloadJob {
3937

4038
@NonNull private final List<ApiFuture<DownloadResult>> downloadResults;
@@ -55,7 +53,6 @@ private DownloadJob(
5553
*
5654
* @see Builder#setDownloadResults(List)
5755
*/
58-
@BetaApi
5956
public @NonNull List<DownloadResult> getDownloadResults() {
6057
return ApiExceptions.callAndTranslateApiException(ApiFutures.allAsList(downloadResults));
6158
}
@@ -65,7 +62,6 @@ private DownloadJob(
6562
*
6663
* @see Builder#setParallelDownloadConfig(ParallelDownloadConfig)
6764
*/
68-
@BetaApi
6965
public @NonNull ParallelDownloadConfig getParallelDownloadConfig() {
7066
return parallelDownloadConfig;
7167
}
@@ -96,7 +92,6 @@ public String toString() {
9692
.toString();
9793
}
9894

99-
@BetaApi
10095
public static Builder newBuilder() {
10196
return new Builder();
10297
}
@@ -106,7 +101,6 @@ public static Builder newBuilder() {
106101
*
107102
* @see DownloadJob
108103
*/
109-
@BetaApi
110104
public static final class Builder {
111105

112106
private @NonNull List<ApiFuture<DownloadResult>> downloadResults;
@@ -122,7 +116,6 @@ private Builder() {
122116
* @return the instance of the Builder with DownloadResults modified.
123117
* @see DownloadJob#getDownloadResults()
124118
*/
125-
@BetaApi
126119
public Builder setDownloadResults(@NonNull List<ApiFuture<DownloadResult>> downloadResults) {
127120
this.downloadResults = ImmutableList.copyOf(downloadResults);
128121
return this;
@@ -134,7 +127,6 @@ public Builder setDownloadResults(@NonNull List<ApiFuture<DownloadResult>> downl
134127
* @return the instance of the Builder with ParallelDownloadConfig modified.
135128
* @see DownloadJob#getParallelDownloadConfig()
136129
*/
137-
@BetaApi
138130
public Builder setParallelDownloadConfig(
139131
@NonNull ParallelDownloadConfig parallelDownloadConfig) {
140132
this.parallelDownloadConfig = parallelDownloadConfig;
@@ -146,7 +138,6 @@ public Builder setParallelDownloadConfig(
146138
*
147139
* @return {@link DownloadJob}
148140
*/
149-
@BetaApi
150141
public DownloadJob build() {
151142
checkNotNull(downloadResults);
152143
checkNotNull(parallelDownloadConfig);

google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/DownloadResult.java

-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import static com.google.common.base.Preconditions.checkNotNull;
2020
import static com.google.common.base.Preconditions.checkState;
2121

22-
import com.google.api.core.BetaApi;
2322
import com.google.cloud.storage.BlobInfo;
2423
import com.google.common.base.MoreObjects;
2524
import java.nio.file.Path;
@@ -33,7 +32,6 @@
3332
*
3433
* @see Builder
3534
*/
36-
@BetaApi
3735
public final class DownloadResult {
3836
static final Comparator<DownloadResult> COMPARATOR =
3937
Comparator.comparingInt(dr -> dr.getStatus().ordinal());
@@ -59,7 +57,6 @@ private DownloadResult(
5957
*
6058
* @see Builder#setInput(BlobInfo)
6159
*/
62-
@BetaApi
6360
public @NonNull BlobInfo getInput() {
6461
return input;
6562
}
@@ -70,7 +67,6 @@ private DownloadResult(
7067
*
7168
* @see Builder#setOutputDestination(Path)
7269
*/
73-
@BetaApi
7470
public @NonNull Path getOutputDestination() {
7571
checkState(
7672
status == TransferStatus.SUCCESS,
@@ -85,7 +81,6 @@ private DownloadResult(
8581
* @see TransferStatus
8682
* @see Builder#setStatus(TransferStatus)
8783
*/
88-
@BetaApi
8984
public @NonNull TransferStatus getStatus() {
9085
return status;
9186
}
@@ -97,7 +92,6 @@ private DownloadResult(
9792
*
9893
* @see Builder#setException(Exception)
9994
*/
100-
@BetaApi
10195
public @NonNull Exception getException() {
10296
checkState(
10397
status == TransferStatus.FAILED_TO_FINISH || status == TransferStatus.FAILED_TO_START,
@@ -136,7 +130,6 @@ public String toString() {
136130
.toString();
137131
}
138132

139-
@BetaApi
140133
public static Builder newBuilder(@NonNull BlobInfo blobInfo, @NonNull TransferStatus status) {
141134
return new Builder(blobInfo, status);
142135
}
@@ -146,7 +139,6 @@ public static Builder newBuilder(@NonNull BlobInfo blobInfo, @NonNull TransferSt
146139
*
147140
* @see DownloadResult
148141
*/
149-
@BetaApi
150142
public static final class Builder {
151143

152144
private @NonNull BlobInfo input;
@@ -165,7 +157,6 @@ private Builder(@NonNull BlobInfo input, @NonNull TransferStatus status) {
165157
* @see DownloadResult#getInput()
166158
* @return the instance of the Builder with the value for input modified.
167159
*/
168-
@BetaApi
169160
public Builder setInput(@NonNull BlobInfo input) {
170161
this.input = input;
171162
return this;
@@ -178,7 +169,6 @@ public Builder setInput(@NonNull BlobInfo input) {
178169
* @see DownloadResult#getOutputDestination()
179170
* @return the instance of the Builder with the value for outputDestination modified.
180171
*/
181-
@BetaApi
182172
public Builder setOutputDestination(@NonNull Path outputDestination) {
183173
this.outputDestination = outputDestination;
184174
return this;
@@ -190,7 +180,6 @@ public Builder setOutputDestination(@NonNull Path outputDestination) {
190180
* @see TransferStatus
191181
* @return the instance of the Builder with the value for status modified.
192182
*/
193-
@BetaApi
194183
public Builder setStatus(@NonNull TransferStatus status) {
195184
this.status = status;
196185
return this;
@@ -204,7 +193,6 @@ public Builder setStatus(@NonNull TransferStatus status) {
204193
* @see DownloadResult#getException()
205194
* @return the instance of the Builder with the value for exception modified.
206195
*/
207-
@BetaApi
208196
public Builder setException(@NonNull Exception exception) {
209197
this.exception = exception;
210198
return this;
@@ -215,7 +203,6 @@ public Builder setException(@NonNull Exception exception) {
215203
*
216204
* @return {@link DownloadResult}
217205
*/
218-
@BetaApi
219206
public DownloadResult build() {
220207
checkNotNull(input);
221208
checkNotNull(status);

google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/ParallelDownloadConfig.java

-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

21-
import com.google.api.core.BetaApi;
2221
import com.google.cloud.storage.Storage.BlobSourceOption;
2322
import com.google.common.base.MoreObjects;
2423
import com.google.common.collect.ImmutableList;
@@ -33,7 +32,6 @@
3332
*
3433
* @see Builder
3534
*/
36-
@BetaApi
3735
public final class ParallelDownloadConfig {
3836

3937
@NonNull private final String stripPrefix;
@@ -57,7 +55,6 @@ private ParallelDownloadConfig(
5755
*
5856
* @see Builder#setStripPrefix(String)
5957
*/
60-
@BetaApi
6158
public @NonNull String getStripPrefix() {
6259
return stripPrefix;
6360
}
@@ -67,7 +64,6 @@ private ParallelDownloadConfig(
6764
*
6865
* @see Builder#setDownloadDirectory(Path)
6966
*/
70-
@BetaApi
7167
public @NonNull Path getDownloadDirectory() {
7268
return downloadDirectory;
7369
}
@@ -77,7 +73,6 @@ private ParallelDownloadConfig(
7773
*
7874
* @see Builder#setBucketName(String)
7975
*/
80-
@BetaApi
8176
public @NonNull String getBucketName() {
8277
return bucketName;
8378
}
@@ -88,7 +83,6 @@ private ParallelDownloadConfig(
8883
*
8984
* @see Builder#setOptionsPerRequest(List)
9085
*/
91-
@BetaApi
9286
public @NonNull List<BlobSourceOption> getOptionsPerRequest() {
9387
return optionsPerRequest;
9488
}
@@ -128,12 +122,10 @@ public String toString() {
128122
*
129123
* @see ParallelDownloadConfig
130124
*/
131-
@BetaApi
132125
public static Builder newBuilder() {
133126
return new Builder();
134127
}
135128

136-
@BetaApi
137129
public static final class Builder {
138130

139131
@NonNull private String stripPrefix;
@@ -155,7 +147,6 @@ private Builder() {
155147
* @return the builder instance with the value for stripPrefix modified.
156148
* @see ParallelDownloadConfig#getStripPrefix()
157149
*/
158-
@BetaApi
159150
public Builder setStripPrefix(String stripPrefix) {
160151
this.stripPrefix = stripPrefix;
161152
return this;
@@ -167,7 +158,6 @@ public Builder setStripPrefix(String stripPrefix) {
167158
* @return the builder instance with the value for downloadDirectory modified.
168159
* @see ParallelDownloadConfig#getDownloadDirectory()
169160
*/
170-
@BetaApi
171161
public Builder setDownloadDirectory(Path downloadDirectory) {
172162
this.downloadDirectory = downloadDirectory;
173163
return this;
@@ -179,7 +169,6 @@ public Builder setDownloadDirectory(Path downloadDirectory) {
179169
* @return the builder instance with the value for bucketName modified.
180170
* @see ParallelDownloadConfig#getBucketName()
181171
*/
182-
@BetaApi
183172
public Builder setBucketName(String bucketName) {
184173
this.bucketName = bucketName;
185174
return this;
@@ -192,7 +181,6 @@ public Builder setBucketName(String bucketName) {
192181
* @return the builder instance with the value for OptionsPerRequest modified.
193182
* @see ParallelDownloadConfig#getOptionsPerRequest()
194183
*/
195-
@BetaApi
196184
public Builder setOptionsPerRequest(List<BlobSourceOption> optionsPerRequest) {
197185
this.optionsPerRequest = ImmutableList.copyOf(optionsPerRequest);
198186
return this;
@@ -203,7 +191,6 @@ public Builder setOptionsPerRequest(List<BlobSourceOption> optionsPerRequest) {
203191
*
204192
* @return {@link ParallelDownloadConfig}
205193
*/
206-
@BetaApi
207194
public ParallelDownloadConfig build() {
208195
checkNotNull(bucketName);
209196
checkNotNull(stripPrefix);

google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/ParallelUploadConfig.java

-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import static com.google.common.base.Preconditions.checkNotNull;
2020

21-
import com.google.api.core.BetaApi;
2221
import com.google.cloud.storage.Storage.BlobWriteOption;
2322
import com.google.common.base.MoreObjects;
2423
import com.google.common.collect.ImmutableList;
@@ -31,7 +30,6 @@
3130
*
3231
* @see Builder
3332
*/
34-
@BetaApi
3533
public final class ParallelUploadConfig {
3634

3735
private final boolean skipIfExists;
@@ -57,7 +55,6 @@ private ParallelUploadConfig(
5755
*
5856
* @see Builder#setSkipIfExists(boolean)
5957
*/
60-
@BetaApi
6158
public boolean isSkipIfExists() {
6259
return skipIfExists;
6360
}
@@ -67,7 +64,6 @@ public boolean isSkipIfExists() {
6764
*
6865
* @see Builder#setPrefix(String)
6966
*/
70-
@BetaApi
7167
public @NonNull String getPrefix() {
7268
return prefix;
7369
}
@@ -77,7 +73,6 @@ public boolean isSkipIfExists() {
7773
*
7874
* @see Builder#setBucketName(String)
7975
*/
80-
@BetaApi
8176
public @NonNull String getBucketName() {
8277
return bucketName;
8378
}
@@ -87,7 +82,6 @@ public boolean isSkipIfExists() {
8782
*
8883
* @see Builder#setWriteOptsPerRequest(List)
8984
*/
90-
@BetaApi
9185
public @NonNull List<BlobWriteOption> getWriteOptsPerRequest() {
9286
return writeOptsPerRequest;
9387
}
@@ -122,7 +116,6 @@ public String toString() {
122116
.toString();
123117
}
124118

125-
@BetaApi
126119
public static Builder newBuilder() {
127120
return new Builder();
128121
}
@@ -141,7 +134,6 @@ private static List<BlobWriteOption> applySkipIfExists(
141134
*
142135
* @see ParallelUploadConfig
143136
*/
144-
@BetaApi
145137
public static final class Builder {
146138

147139
private boolean skipIfExists;
@@ -162,7 +154,6 @@ private Builder() {
162154
* @return the builder instance with the value for skipIfExists modified.
163155
* @see ParallelUploadConfig#isSkipIfExists()
164156
*/
165-
@BetaApi
166157
public Builder setSkipIfExists(boolean skipIfExists) {
167158
this.skipIfExists = skipIfExists;
168159
return this;
@@ -174,7 +165,6 @@ public Builder setSkipIfExists(boolean skipIfExists) {
174165
* @return the builder instance with the value for prefix modified.
175166
* @see ParallelUploadConfig#getPrefix()
176167
*/
177-
@BetaApi
178168
public Builder setPrefix(@NonNull String prefix) {
179169
this.prefix = prefix;
180170
return this;
@@ -186,7 +176,6 @@ public Builder setPrefix(@NonNull String prefix) {
186176
* @return the builder instance with the value for bucketName modified.
187177
* @see ParallelUploadConfig#getBucketName()
188178
*/
189-
@BetaApi
190179
public Builder setBucketName(@NonNull String bucketName) {
191180
this.bucketName = bucketName;
192181
return this;
@@ -199,7 +188,6 @@ public Builder setBucketName(@NonNull String bucketName) {
199188
* @return the builder instance with the value for WriteOptsPerRequest modified.
200189
* @see ParallelUploadConfig#getWriteOptsPerRequest()
201190
*/
202-
@BetaApi
203191
public Builder setWriteOptsPerRequest(@NonNull List<BlobWriteOption> writeOptsPerRequest) {
204192
this.writeOptsPerRequest = writeOptsPerRequest;
205193
return this;
@@ -210,7 +198,6 @@ public Builder setWriteOptsPerRequest(@NonNull List<BlobWriteOption> writeOptsPe
210198
*
211199
* @return {@link ParallelUploadConfig}
212200
*/
213-
@BetaApi
214201
public ParallelUploadConfig build() {
215202
checkNotNull(prefix);
216203
checkNotNull(bucketName);

0 commit comments

Comments
 (0)