public abstract class RecommendationAIPredict extends PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>
PTransform using the Recommendations AI API (https://cloud.google.com/recommendations).
Takes an input PCollection of GenericJsons and creates PredictResponse.PredictionResults.
It is possible to provide a catalog name to which you want to add the user event (defaults to "default_catalog"). It is possible to provide a event store to which you want to add the user event (defaults to "default_event_store"). A placement id for the recommendation engine placement to be used.
| Modifier and Type | Field and Description |
|---|---|
static TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> |
FAILURE_TAG |
static TupleTag<com.google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult> |
SUCCESS_TAG |
name, resourceHints| Constructor and Description |
|---|
RecommendationAIPredict() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.lang.String |
catalogName() |
abstract java.lang.String |
eventStore() |
PCollectionTuple |
expand(PCollection<com.google.api.client.json.GenericJson> input)
Override this method to specify how this
PTransform should be expanded on the given
InputT. |
abstract java.lang.String |
placementId() |
abstract java.lang.String |
projectId() |
RecommendationAIPredict |
withCatalogName(java.lang.String catalogName) |
RecommendationAIPredict |
withEventStore(java.lang.String eventStore) |
RecommendationAIPredict |
withPlacementId(java.lang.String placementId) |
RecommendationAIPredict |
withProjectId(java.lang.String projectId) |
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validatepublic static final TupleTag<com.google.cloud.recommendationengine.v1beta1.PredictResponse.PredictionResult> SUCCESS_TAG
public static final TupleTag<com.google.cloud.recommendationengine.v1beta1.UserEvent> FAILURE_TAG
@Nullable public abstract java.lang.String projectId()
@Nullable public abstract java.lang.String catalogName()
@Nullable public abstract java.lang.String eventStore()
public abstract java.lang.String placementId()
public RecommendationAIPredict withProjectId(java.lang.String projectId)
public RecommendationAIPredict withCatalogName(java.lang.String catalogName)
public RecommendationAIPredict withEventStore(java.lang.String eventStore)
public RecommendationAIPredict withPlacementId(java.lang.String placementId)
public PCollectionTuple expand(PCollection<com.google.api.client.json.GenericJson> input)
PTransformPTransform should be expanded on the given
InputT.
NOTE: This method should not be called directly. Instead apply the PTransform should
be applied to the InputT using the apply method.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand in class PTransform<PCollection<com.google.api.client.json.GenericJson>,PCollectionTuple>