Skip to content

Commit eee00f6

Browse files
committed
feat: graduate Pipeline and related APIs from beta to GA
Removed @BetaApi annotations from Pipeline, PipelineSource, PipelineResult, ExplainStats, and all expressions in the firestore.pipeline.expressions package. Telemetry options and Firestore.pipeline() are also GA. Retained @BetaApi for search and DML (delete/update) stages as requested.
1 parent 0c81885 commit eee00f6

23 files changed

Lines changed: 0 additions & 745 deletions

google-cloud-firestore/src/main/java/com/google/cloud/firestore/ExplainStats.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.firestore;
1818

19-
import com.google.api.core.BetaApi;
2019
import com.google.protobuf.Any;
2120
import com.google.protobuf.InvalidProtocolBufferException;
2221
import com.google.protobuf.StringValue;
@@ -26,7 +25,6 @@
2625
* A wrapper object to access explain stats if explain or analyze was enabled for the Pipeline query
2726
* execution.
2827
*/
29-
@BetaApi
3028
public final class ExplainStats {
3129

3230
private final Any explainStatsData;

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreException.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.firestore;
1818

19-
import com.google.api.core.BetaApi;
2019
import com.google.api.gax.rpc.ApiException;
2120
import com.google.api.gax.rpc.StatusCode;
2221
import com.google.cloud.grpc.BaseGrpcServiceException;
@@ -58,7 +57,6 @@ private FirestoreException(IOException exception, boolean retryable) {
5857
*
5958
* @return The FirestoreException
6059
*/
61-
@BetaApi
6260
public static FirestoreException forInvalidArgument(String message, Object... params) {
6361
return new FirestoreException(String.format(message, params), Status.INVALID_ARGUMENT);
6462
}
@@ -69,7 +67,6 @@ public static FirestoreException forInvalidArgument(String message, Object... pa
6967
*
7068
* @return The FirestoreException
7169
*/
72-
@BetaApi
7370
public static FirestoreException forServerRejection(
7471
Status status, String message, Object... params) {
7572
return forServerRejection(status, null, message, params);
@@ -81,7 +78,6 @@ public static FirestoreException forServerRejection(
8178
*
8279
* @return The FirestoreException
8380
*/
84-
@BetaApi
8581
public static FirestoreException forServerRejection(
8682
Status status, @Nullable Throwable cause, String message, Object... params) {
8783
return new FirestoreException(String.format(message, params), status, cause);
@@ -92,7 +88,6 @@ public static FirestoreException forServerRejection(
9288
*
9389
* @return The FirestoreException
9490
*/
95-
@BetaApi
9691
public static FirestoreException forIOException(IOException exception, boolean retryable) {
9792
return new FirestoreException(exception, retryable);
9893
}
@@ -102,7 +97,6 @@ public static FirestoreException forIOException(IOException exception, boolean r
10297
*
10398
* @return The FirestoreException
10499
*/
105-
@BetaApi
106100
public static FirestoreException forApiException(ApiException exception) {
107101
return new FirestoreException(exception.getMessage(), exception);
108102
}
@@ -112,12 +106,10 @@ public static FirestoreException forApiException(ApiException exception) {
112106
*
113107
* @return The FirestoreException
114108
*/
115-
@BetaApi
116109
public static FirestoreException forApiException(ApiException exception, String message) {
117110
return new FirestoreException(message, exception);
118111
}
119112

120-
@BetaApi
121113
@Nullable
122114
public Status getStatus() {
123115
return status;

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
import com.google.api.core.ApiClock;
2323
import com.google.api.core.ApiFuture;
24-
import com.google.api.core.BetaApi;
2524
import com.google.api.core.NanoClock;
2625
import com.google.api.core.ObsoleteApi;
2726
import com.google.api.core.SettableApiFuture;
@@ -419,7 +418,6 @@ public CollectionGroup collectionGroup(@Nonnull final String collectionId) {
419418

420419
@Nonnull
421420
@Override
422-
@BetaApi
423421
public PipelineSource pipeline() {
424422
return new PipelineSource(this);
425423
}

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreOpenTelemetryOptions.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package com.google.cloud.firestore;
1818

19-
import com.google.api.core.BetaApi;
2019
import io.opentelemetry.api.OpenTelemetry;
2120
import javax.annotation.Nonnull;
2221
import javax.annotation.Nullable;
@@ -25,7 +24,6 @@
2524
* Represents the options that are used to configure the use of OpenTelemetry for telemetry
2625
* collection in the Firestore SDK.
2726
*/
28-
@BetaApi
2927
public class FirestoreOpenTelemetryOptions {
3028
private final boolean exportBuiltinMetricsToGoogleCloudMonitoring;
3129
private final @Nullable OpenTelemetry openTelemetry;

google-cloud-firestore/src/main/java/com/google/cloud/firestore/FirestoreOptions.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.google.cloud.firestore;
1818

1919
import com.google.api.core.ApiFunction;
20-
import com.google.api.core.BetaApi;
2120
import com.google.api.core.InternalApi;
2221
import com.google.api.gax.core.CredentialsProvider;
2322
import com.google.api.gax.core.FixedCredentialsProvider;
@@ -159,7 +158,6 @@ com.google.cloud.firestore.telemetry.MetricsUtil getMetricsUtil() {
159158
return metricsUtil;
160159
}
161160

162-
@BetaApi
163161
@Nonnull
164162
public FirestoreOpenTelemetryOptions getOpenTelemetryOptions() {
165163
return openTelemetryOptions;
@@ -277,7 +275,6 @@ public Builder setDatabaseId(@Nonnull String databaseId) {
277275
*
278276
* @param openTelemetryOptions The `FirestoreOpenTelemetryOptions` to use.
279277
*/
280-
@BetaApi
281278
@Nonnull
282279
public Builder setOpenTelemetryOptions(
283280
@Nonnull FirestoreOpenTelemetryOptions openTelemetryOptions) {

google-cloud-firestore/src/main/java/com/google/cloud/firestore/Pipeline.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,11 @@
138138
* .get();
139139
* }</pre>
140140
*/
141-
@BetaApi
142141
public final class Pipeline {
143142
/**
144143
* A Snapshot contains the results of a pipeline execution. It can be used to access the
145144
* documents, execution time, and explain stats.
146145
*/
147-
@BetaApi
148146
public static final class Snapshot {
149147

150148
private final Pipeline pipeline;
@@ -269,7 +267,6 @@ public Pipeline search(Search searchStage) {
269267
* Selectable} expressions.
270268
* @return A new Pipeline object with this stage appended to the stage list.
271269
*/
272-
@BetaApi
273270
public Pipeline addFields(Selectable field, Selectable... additionalFields) {
274271
return append(
275272
new AddFields(
@@ -503,7 +500,6 @@ public Expression toScalarExpression() {
503500
* @param additionalFields The additional fields to remove.
504501
* @return A new Pipeline object with this stage appended to the stage list.
505502
*/
506-
@BetaApi
507503
public Pipeline removeFields(String field, String... additionalFields) {
508504
return append(
509505
new RemoveFields(
@@ -528,7 +524,6 @@ public Pipeline removeFields(String field, String... additionalFields) {
528524
* @param additionalFields The additional fields to remove.
529525
* @return A new Pipeline object with this stage appended to the stage list.
530526
*/
531-
@BetaApi
532527
public Pipeline removeFields(Field field, Field... additionalFields) {
533528
return append(
534529
new RemoveFields(
@@ -568,7 +563,6 @@ public Pipeline removeFields(Field field, Field... additionalFields) {
568563
* @param additionalSelections The additional fields to include in the output documents,
569564
* @return A new Pipeline object with this stage appended to the stage list.
570565
*/
571-
@BetaApi
572566
public Pipeline select(Selectable selection, Selectable... additionalSelections) {
573567
return append(
574568
new Select(
@@ -602,7 +596,6 @@ public Pipeline select(Selectable selection, Selectable... additionalSelections)
602596
* @param additionalFields The additional fields to include in the output documents.
603597
* @return A new Pipeline object with this stage appended to the stage list.
604598
*/
605-
@BetaApi
606599
public Pipeline select(String field, String... additionalFields) {
607600
return append(
608601
new Select(
@@ -646,7 +639,6 @@ public Pipeline select(String field, String... additionalFields) {
646639
* @param condition The {@link BooleanExpression} to apply.
647640
* @return A new Pipeline object with this stage appended to the stage list.
648641
*/
649-
@BetaApi
650642
public Pipeline where(BooleanExpression condition) {
651643
return append(new Where(condition));
652644
}
@@ -671,7 +663,6 @@ public Pipeline where(BooleanExpression condition) {
671663
* @param offset The number of documents to skip.
672664
* @return A new Pipeline object with this stage appended to the stage list.
673665
*/
674-
@BetaApi
675666
public Pipeline offset(int offset) {
676667
return append(new Offset(offset));
677668
}
@@ -701,7 +692,6 @@ public Pipeline offset(int offset) {
701692
* @param limit The maximum number of documents to return.
702693
* @return A new Pipeline object with this stage appended to the stage list.
703694
*/
704-
@BetaApi
705695
public Pipeline limit(int limit) {
706696
return append(new Limit(limit));
707697
}
@@ -727,7 +717,6 @@ public Pipeline limit(int limit) {
727717
* AggregateFunction} and provide a name for the accumulated results.
728718
* @return A new Pipeline object with this stage appended to the stage list.
729719
*/
730-
@BetaApi
731720
public Pipeline aggregate(AliasedAggregate... accumulators) {
732721
return append(Aggregate.withAccumulators(accumulators));
733722
}
@@ -765,12 +754,10 @@ public Pipeline aggregate(AliasedAggregate... accumulators) {
765754
* the aggregation operations to perform.
766755
* @return A new {@code Pipeline} object with this stage appended to the stage list.
767756
*/
768-
@BetaApi
769757
public Pipeline aggregate(Aggregate aggregate) {
770758
return append(aggregate);
771759
}
772760

773-
@BetaApi
774761
public Pipeline aggregate(Aggregate aggregate, AggregateOptions options) {
775762
return append(aggregate.withOptions(options));
776763
}
@@ -792,7 +779,6 @@ public Pipeline aggregate(Aggregate aggregate, AggregateOptions options) {
792779
* @param fields The fields to consider when determining distinct values.
793780
* @return A new {@code Pipeline} object with this stage appended to the stage list.
794781
*/
795-
@BetaApi
796782
public Pipeline distinct(String... fields) {
797783
return append(new Distinct(PipelineUtils.fieldNamesToMap(fields)));
798784
}
@@ -824,7 +810,6 @@ public Pipeline distinct(String... fields) {
824810
* value combinations.
825811
* @return A new {@code Pipeline} object with this stage appended to the stage list.
826812
*/
827-
@BetaApi
828813
public Pipeline distinct(Selectable... selectables) {
829814
return append(new Distinct(PipelineUtils.selectablesToMap(selectables)));
830815
}
@@ -855,7 +840,6 @@ public Pipeline distinct(Selectable... selectables) {
855840
* distance field name.
856841
* @return A new {@code Pipeline} object with this stage appended to the stage list.
857842
*/
858-
@BetaApi
859843
public Pipeline findNearest(
860844
String fieldName,
861845
double[] vector,
@@ -893,7 +877,6 @@ public Pipeline findNearest(
893877
* distance field name.
894878
* @return A new {@code Pipeline} object with this stage appended to the stage list.
895879
*/
896-
@BetaApi
897880
public Pipeline findNearest(
898881
Expression property,
899882
double[] vector,
@@ -926,7 +909,6 @@ public Pipeline findNearest(
926909
* @param orders One or more {@link Ordering} instances specifying the sorting criteria.
927910
* @return A new {@code Pipeline} object with this stage appended to the stage list.
928911
*/
929-
@BetaApi
930912
public Pipeline sort(Ordering... orders) {
931913
return append(new Sort(ImmutableList.copyOf(orders)));
932914
}
@@ -962,7 +944,6 @@ public Pipeline sort(Ordering... orders) {
962944
* @param fieldName The name of the field containing the nested map.
963945
* @return A new {@code Pipeline} object with this stage appended to the stage list.
964946
*/
965-
@BetaApi
966947
public Pipeline replaceWith(String fieldName) {
967948
return replaceWith(field(fieldName));
968949
}
@@ -998,7 +979,6 @@ public Pipeline replaceWith(String fieldName) {
998979
* @param expr The {@link Expression} field containing the nested map.
999980
* @return A new {@code Pipeline} object with this stage appended to the stage list.
1000981
*/
1001-
@BetaApi
1002982
public Pipeline replaceWith(Expression expr) {
1003983
return append(new ReplaceWith(expr));
1004984
}
@@ -1021,7 +1001,6 @@ public Pipeline replaceWith(Expression expr) {
10211001
* @param limit The number of documents to emit, if possible.
10221002
* @return A new {@code Pipeline} object with this stage appended to the stage list.
10231003
*/
1024-
@BetaApi
10251004
public Pipeline sample(int limit) {
10261005
return sample(Sample.withDocLimit(limit));
10271006
}
@@ -1047,7 +1026,6 @@ public Pipeline sample(int limit) {
10471026
* @param sample The {@code Sample} specifies how sampling is performed.
10481027
* @return A new {@code Pipeline} object with this stage appended to the stage list.
10491028
*/
1050-
@BetaApi
10511029
public Pipeline sample(Sample sample) {
10521030
return append(sample);
10531031
}
@@ -1110,7 +1088,6 @@ public Pipeline union(Pipeline other) {
11101088
* @param fieldName The name of the field containing the array.
11111089
* @return A new {@code Pipeline} object with this stage appended to the stage list.
11121090
*/
1113-
@BetaApi
11141091
public Pipeline unnest(String fieldName, String alias) {
11151092
// return unnest(field(fieldName));
11161093
return append(new Unnest(field(fieldName), alias));
@@ -1148,7 +1125,6 @@ public Pipeline unnest(String fieldName, String alias) {
11481125
* @param options The {@code UnnestOptions} options.
11491126
* @return A new {@code Pipeline} object with this stage appended to the stage list.
11501127
*/
1151-
@BetaApi
11521128
public Pipeline unnest(String fieldName, String alias, UnnestOptions options) {
11531129
return append(new Unnest(field(fieldName), alias, options));
11541130
}
@@ -1184,7 +1160,6 @@ public Pipeline unnest(String fieldName, String alias, UnnestOptions options) {
11841160
* @param expr The name of the expression containing the array.
11851161
* @return A new {@code Pipeline} object with this stage appended to the stage list.
11861162
*/
1187-
@BetaApi
11881163
public Pipeline unnest(Selectable expr) {
11891164
return append(new Unnest(expr));
11901165
}
@@ -1221,7 +1196,6 @@ public Pipeline unnest(Selectable expr) {
12211196
* @param options The {@code UnnestOptions} options.
12221197
* @return A new {@code Pipeline} object with this stage appended to the stage list.
12231198
*/
1224-
@BetaApi
12251199
public Pipeline unnest(Selectable field, UnnestOptions options) {
12261200
return append(new Unnest(field, options));
12271201
}
@@ -1359,7 +1333,6 @@ public Pipeline update(Update update) {
13591333
*
13601334
* @return A new {@code Pipeline} object with this stage appended to the stage list.
13611335
*/
1362-
@BetaApi
13631336
public Pipeline rawStage(RawStage stage) {
13641337
return append(stage);
13651338
}
@@ -1395,12 +1368,10 @@ public Pipeline rawStage(RawStage stage) {
13951368
*
13961369
* @return An {@link ApiFuture} representing the asynchronous pipeline execution.
13971370
*/
1398-
@BetaApi
13991371
public ApiFuture<Snapshot> execute() {
14001372
return execute(new PipelineExecuteOptions(), null, null);
14011373
}
14021374

1403-
@BetaApi
14041375
public ApiFuture<Snapshot> execute(PipelineExecuteOptions options) {
14051376
return execute(options, null, null);
14061377
}
@@ -1454,7 +1425,6 @@ MetricsContext createMetricsContext(String methodName) {
14541425
*
14551426
* @param observer The {@link ApiStreamObserver} to receive pipeline results and events.
14561427
*/
1457-
@BetaApi
14581428
public void execute(ApiStreamObserver<PipelineResult> observer) {
14591429
if (this.rpcContext == null) {
14601430
throw new IllegalStateException(

0 commit comments

Comments
 (0)