diff --git a/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/DummyResourceLix.java b/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/DummyResourceLix.java new file mode 100644 index 000000000..057685cb9 --- /dev/null +++ b/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/DummyResourceLix.java @@ -0,0 +1,93 @@ +package com.linkedin.metadata.restli.lix; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + + +public class DummyResourceLix implements ResourceLix { + + @Override + public boolean testGet(@Nonnull String urn, @Nonnull String entityType) { + return false; + } + + @Override + public boolean testBatchGet(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBatchGetWithErrors(@Nullable String urn, @Nullable String type) { + return false; + } + + @Override + public boolean testIngest(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName) { + return false; + } + + @Override + public boolean testIngestWithTracking(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName) { + return false; + } + + @Override + public boolean testGetSnapshot(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfillLegacy(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfillWithUrns(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testEmitNoChangeMetadataAuditEvent(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfillWithNewValue(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfillEntityTables(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfillRelationshipTables(@Nullable String urn, @Nullable String entityType) { + return false; + } + + @Override + public boolean testBackfill(@Nonnull String assetType, @Nonnull String mode) { + return false; + } + + @Override + public boolean testFilter(@Nonnull String assetType) { + return false; + } + + @Override + public boolean testGetAll(@Nullable String urnType) { + return false; + } + + @Override + public boolean testSearch(@Nullable String urnType) { + return false; + } + + @Override + public boolean testSearchV2(@Nullable String urnType) { + return false; + } +} \ No newline at end of file diff --git a/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/ResourceLix.java b/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/ResourceLix.java new file mode 100644 index 000000000..b9c315091 --- /dev/null +++ b/restli-resources/src/main/java/com/linkedin/metadata/restli/lix/ResourceLix.java @@ -0,0 +1,146 @@ +package com.linkedin.metadata.restli.lix; + +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + + +/** + * Experimental controls on resources APIs. + * LI internal: go/gma/experimentalLiX + */ +public interface ResourceLix { + + /** + * Experiment on the GET. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testGet(@Nonnull String urn, @Nonnull String entityType); + + /** + * Experiment on the BatchGet. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBatchGet(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BatchGetWithErrors. + * @param urn urnString of the entity + * @param type type of the entity + * @return enabling/not + */ + boolean testBatchGetWithErrors(@Nullable String urn, @Nullable String type); + + /** + * Experiment on the Ingest. + * @param urn urnString of the entity + * @param entityType type of the entity + * @param aspectName aspect FQCN of the urn + * @return enabling/not + */ + boolean testIngest(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName); + + /** + * Experiment on the IngestWithTracking. + * @param urn urnString of the entity + * @param entityType type of the entity + * @param aspectName aspect FQCN of the urn + * @return enabling/not enabling/not + */ + boolean testIngestWithTracking(@Nonnull String urn, @Nonnull String entityType, @Nullable String aspectName); + + /** + * Experiment on the GetSnapshot. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testGetSnapshot(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BackfillLegacy. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBackfillLegacy(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BackfillWithUrns. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBackfillWithUrns(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the EmitNoChangeMetadataAuditEvent. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testEmitNoChangeMetadataAuditEvent(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BackfillWithNewValue. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBackfillWithNewValue(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BackfillEntityTables. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBackfillEntityTables(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the BackfillRelationshipTables. + * @param urn urnString of the entity + * @param entityType type of the entity + * @return enabling/not + */ + boolean testBackfillRelationshipTables(@Nullable String urn, @Nullable String entityType); + + /** + * Experiment on the Backfill. + * @param assetType the type of the asset + * @param mode backfill mode + * @return enabling/not + */ + boolean testBackfill(@Nonnull String assetType, @Nonnull String mode); + + /** + * Experiment on the Filter. + * @param assetType the type of the asset + * @return enabling/not + */ + boolean testFilter(@Nonnull String assetType); + + /** + * Experiment on the GetAll. + * @param urnType the type of the urn + * @return enabling/not + */ + boolean testGetAll(@Nullable String urnType); + + /** + * Experiment on the Search. + * @param urnType the type of the urn + * @return enabling/not + */ + boolean testSearch(@Nullable String urnType); + + /** + * Experiment on the SearchV2. + * @param urnType the type of the urn + * @return enabling/not + */ + boolean testSearchV2(@Nullable String urnType); +} \ No newline at end of file