hopsworks-master/hopsworks-common/src/main/java/io/hops/hopsworks/common/featurestore/featuregroup/stream/StreamFeatureGroupDTO.java
/*
 * This file is part of Hopsworks
 * Copyright (C) 2021, Logical Clocks AB. All rights reserved
 *
 * Hopsworks is free software: you can redistribute it and/or modify it under the terms of
 * the GNU Affero General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 *  Hopsworks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 *  PURPOSE.  See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License along with this program.
 *  If not, see <https://www.gnu.org/licenses/>.
 */

package io.hops.hopsworks.common.featurestore.featuregroup.stream;

import com.fasterxml.jackson.annotation.JsonTypeName;
import io.hops.hopsworks.common.featurestore.featuregroup.FeaturegroupDTO;
import io.hops.hopsworks.persistence.entity.featurestore.featuregroup.Featuregroup;
import io.hops.hopsworks.persistence.entity.featurestore.featuregroup.cached.TimeTravelFormat;
import javax.xml.bind.annotation.XmlRootElement;
import java.util.List;
import java.util.Objects;


@XmlRootElement
@JsonTypeName("streamFeatureGroupDTO")
public class StreamFeatureGroupDTO extends FeaturegroupDTO {
  private TimeTravelFormat timeTravelFormat = TimeTravelFormat.HUDI;
  private DeltaStreamerJobConf deltaStreamerJobConf;

  private List<FeaturegroupDTO> parents;

  public StreamFeatureGroupDTO() {
    super();
  }

  public StreamFeatureGroupDTO(Featuregroup featuregroup) {
    super(featuregroup);
  }

  public DeltaStreamerJobConf getDeltaStreamerJobConf() {
    return deltaStreamerJobConf;
  }

  public void setDeltaStreamerJobConf(
    DeltaStreamerJobConf deltaStreamerJobConf) {
    this.deltaStreamerJobConf = deltaStreamerJobConf;
  }

  public TimeTravelFormat getTimeTravelFormat() {
    return timeTravelFormat;
  }

  public void setTimeTravelFormat(
    TimeTravelFormat timeTravelFormat) {
    this.timeTravelFormat = timeTravelFormat;
  }

  public List<FeaturegroupDTO> getParents() {
    return parents;
  }

  public void setParents(List<FeaturegroupDTO> parents) {
    this.parents = parents;
  }

  @Override
  public String toString() {
    return "StreamFeatureGroupDTO{" +
      "timeTravelFormat=" + timeTravelFormat +
      ", deltaStreamerJobConf=" + deltaStreamerJobConf +
      ", parentFeatureGroups =" + Objects.toString(parents) +
      '}';
  }
}
