datahub.client.patch.common.OwnershipPatchBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of datahub-client Show documentation
Show all versions of datahub-client Show documentation
DataHub Java client for metadata integration
package datahub.client.patch.common;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import com.linkedin.common.OwnershipType;
import com.linkedin.common.urn.Urn;
import datahub.client.patch.AbstractPatchBuilder;
import java.util.stream.Stream;
import static com.fasterxml.jackson.databind.node.JsonNodeFactory.*;
import static com.linkedin.metadata.Constants.*;
public class OwnershipPatchBuilder extends AbstractPatchBuilder {
private static final String BASE_PATH = "/owners/";
private static final String OWNER_KEY = "owner";
private static final String TYPE_KEY = "type";
/**
* The owner to update with this patch operation
*/
private Urn owner = null;
private OwnershipType type = null;
public OwnershipPatchBuilder owner(Urn owner) {
this.owner = owner;
return this;
}
public OwnershipPatchBuilder ownershipType(OwnershipType type) {
this.type = type;
return this;
}
@Override
protected Stream