All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.digdag.spi.ac.ProjectTarget Maven / Gradle / Ivy

There is a newer version: 0.10.5.1
Show newest version
package io.digdag.spi.ac;

import com.google.common.base.Optional;
import org.immutables.value.Value;

@Value.Immutable
public interface ProjectTarget
{
    int getSiteId();

    String getName();

    Optional getId();

    // TODO better to have revision info?

    static ProjectTarget of(int siteId, String name)
    {
        return of(siteId, name, Optional.absent());
    }

    static ProjectTarget of(int siteId, String name, int id)
    {
        return of(siteId, name, Optional.of(id));
    }

    static ProjectTarget of(int siteId, String name, Optional id)
    {
        return ImmutableProjectTarget.builder()
                .siteId(siteId)
                .name(name)
                .id(id)
                .build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy