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

org.cloudfoundry.client.lib.domain.CloudApplication Maven / Gradle / Ivy

The newest version!
package org.cloudfoundry.client.lib.domain;

import java.util.List;
import java.util.Map;

import org.cloudfoundry.AllowNulls;
import org.cloudfoundry.client.lib.domain.annotation.Nullable;
import org.immutables.value.Value;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

@Value.Immutable
@JsonSerialize(as = ImmutableCloudApplication.class)
@JsonDeserialize(as = ImmutableCloudApplication.class)
public abstract class CloudApplication extends CloudEntity implements Derivable {

    public enum State {
        UPDATING, STARTED, STOPPED
    }

    @Value.Default
    public int getMemory() {
        return 0;
    }

    @Value.Default
    public int getDiskQuota() {
        return 0;
    }

    @Value.Default
    public int getInstances() {
        return 1;
    }

    @Value.Default
    public int getRunningInstances() {
        return 0;
    }

    @Nullable
    public abstract State getState();

    @Nullable
    public abstract Staging getStaging();

    @Nullable
    public abstract PackageState getPackageState();

    @Nullable
    public abstract String getStagingError();

    public abstract List getUris();

    public abstract List getServices();

    @AllowNulls
    public abstract Map getEnv();

    @Nullable
    public abstract CloudSpace getSpace();

    @Override
    public CloudApplication derive() {
        return this;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy