org.cloudfoundry.client.v2.applications.SummaryApplicationResponse Maven / Gradle / Ivy
package org.cloudfoundry.client.v2.applications;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.cloudfoundry.Nullable;
import org.cloudfoundry.client.v2.domains.Domain;
import org.cloudfoundry.client.v2.routes.Route;
import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance;
import org.immutables.value.Generated;
/**
* The response payload for the Get Application Summary operation
*/
@Generated(from = "_SummaryApplicationResponse", generator = "Immutables")
@SuppressWarnings({"all", "deprecation", "removal"})
@javax.annotation.Generated("org.immutables.processor.ProxyProcessor")
public final class SummaryApplicationResponse
extends org.cloudfoundry.client.v2.applications._SummaryApplicationResponse {
private final @Nullable String buildpack;
private final @Nullable String command;
private final @Nullable Boolean console;
private final @Nullable String debug;
private final @Nullable String detectedStartCommand;
private final @Nullable Boolean diego;
private final @Nullable Integer diskQuota;
private final @Nullable DockerCredentials dockerCredentials;
private final @Nullable String dockerImage;
private final @Nullable Map environmentJsons;
private final @Nullable String healthCheckHttpEndpoint;
private final @Nullable Integer healthCheckTimeout;
private final @Nullable String healthCheckType;
private final @Nullable Integer instances;
private final @Nullable Integer memory;
private final @Nullable String name;
private final @Nullable Boolean production;
private final @Nullable String spaceId;
private final @Nullable String stackId;
private final @Nullable String stagingFailedDescription;
private final @Nullable String stagingFailedReason;
private final @Nullable String stagingTaskId;
private final @Nullable String state;
private final @Nullable List availableDomains;
private final @Nullable String detectedBuildpack;
private final @Nullable String detectedBuildpackId;
private final @Nullable Boolean enableSsh;
private final @Nullable String id;
private final @Nullable String packageState;
private final @Nullable String packageUpdatedAt;
private final @Nullable List ports;
private final @Nullable List routes;
private final @Nullable Integer runningInstances;
private final @Nullable List services;
private final @Nullable String version;
private final @Nullable Integer logRateLimit;
private SummaryApplicationResponse(SummaryApplicationResponse.Builder builder) {
this.buildpack = builder.buildpack;
this.command = builder.command;
this.console = builder.console;
this.debug = builder.debug;
this.detectedStartCommand = builder.detectedStartCommand;
this.diego = builder.diego;
this.diskQuota = builder.diskQuota;
this.dockerCredentials = builder.dockerCredentials;
this.dockerImage = builder.dockerImage;
this.environmentJsons = builder.environmentJsons == null ? null : createUnmodifiableMap(false, false, builder.environmentJsons);
this.healthCheckHttpEndpoint = builder.healthCheckHttpEndpoint;
this.healthCheckTimeout = builder.healthCheckTimeout;
this.healthCheckType = builder.healthCheckType;
this.instances = builder.instances;
this.memory = builder.memory;
this.name = builder.name;
this.production = builder.production;
this.spaceId = builder.spaceId;
this.stackId = builder.stackId;
this.stagingFailedDescription = builder.stagingFailedDescription;
this.stagingFailedReason = builder.stagingFailedReason;
this.stagingTaskId = builder.stagingTaskId;
this.state = builder.state;
this.availableDomains = builder.availableDomains == null ? null : createUnmodifiableList(true, builder.availableDomains);
this.detectedBuildpack = builder.detectedBuildpack;
this.detectedBuildpackId = builder.detectedBuildpackId;
this.enableSsh = builder.enableSsh;
this.id = builder.id;
this.packageState = builder.packageState;
this.packageUpdatedAt = builder.packageUpdatedAt;
this.ports = builder.ports == null ? null : createUnmodifiableList(true, builder.ports);
this.routes = builder.routes == null ? null : createUnmodifiableList(true, builder.routes);
this.runningInstances = builder.runningInstances;
this.services = builder.services == null ? null : createUnmodifiableList(true, builder.services);
this.version = builder.version;
this.logRateLimit = builder.logRateLimit;
}
/**
* The buildpack
*/
@JsonProperty("buildpack")
@Override
public @Nullable String getBuildpack() {
return buildpack;
}
/**
* The command
*/
@JsonProperty("command")
@Override
public @Nullable String getCommand() {
return command;
}
/**
* The console
*/
@JsonProperty("console")
@Deprecated
@Override
public @Nullable Boolean getConsole() {
return console;
}
/**
* Debug
*/
@JsonProperty("debug")
@Deprecated
@Override
public @Nullable String getDebug() {
return debug;
}
/**
* The detected start command
*/
@JsonProperty("detected_start_command")
@Override
public @Nullable String getDetectedStartCommand() {
return detectedStartCommand;
}
/**
* Diego
*/
@JsonProperty("diego")
@Override
public @Nullable Boolean getDiego() {
return diego;
}
/**
* The disk quota in megabytes
*/
@JsonProperty("disk_quota")
@Override
public @Nullable Integer getDiskQuota() {
return diskQuota;
}
/**
* The docker credentials
*/
@JsonProperty("docker_credentials")
@Override
public @Nullable DockerCredentials getDockerCredentials() {
return dockerCredentials;
}
/**
* The docker image
*/
@JsonProperty("docker_image")
@Override
public @Nullable String getDockerImage() {
return dockerImage;
}
/**
* The environment JSONs
*/
@JsonProperty("environment_json")
@Override
public @Nullable Map getEnvironmentJsons() {
return environmentJsons;
}
/**
* The health check HTTP endpoint
*/
@JsonProperty("health_check_http_endpoint")
@Override
public @Nullable String getHealthCheckHttpEndpoint() {
return healthCheckHttpEndpoint;
}
/**
* The health check timeout
*/
@JsonProperty("health_check_timeout")
@Override
public @Nullable Integer getHealthCheckTimeout() {
return healthCheckTimeout;
}
/**
* The health check type
*/
@JsonProperty("health_check_type")
@Override
public @Nullable String getHealthCheckType() {
return healthCheckType;
}
/**
* The instances
*/
@JsonProperty("instances")
@Override
public @Nullable Integer getInstances() {
return instances;
}
/**
* The memory in megabytes
*/
@JsonProperty("memory")
@Override
public @Nullable Integer getMemory() {
return memory;
}
/**
* The name
*/
@JsonProperty("name")
@Override
public @Nullable String getName() {
return name;
}
/**
* Production
*/
@JsonProperty("production")
@Deprecated
@Override
public @Nullable Boolean getProduction() {
return production;
}
/**
* The space id
*/
@JsonProperty("space_guid")
@Override
public @Nullable String getSpaceId() {
return spaceId;
}
/**
* The stack id
*/
@JsonProperty("stack_guid")
@Override
public @Nullable String getStackId() {
return stackId;
}
/**
* The staging failed description
*/
@JsonProperty("staging_failed_description")
@Override
public @Nullable String getStagingFailedDescription() {
return stagingFailedDescription;
}
/**
* The staging failed reason
*/
@JsonProperty("staging_failed_reason")
@Override
public @Nullable String getStagingFailedReason() {
return stagingFailedReason;
}
/**
* The staging task id
*/
@JsonProperty("staging_task_id")
@Override
public @Nullable String getStagingTaskId() {
return stagingTaskId;
}
/**
* The state
*/
@JsonProperty("state")
@Override
public @Nullable String getState() {
return state;
}
/**
* The available domains
*/
@JsonProperty("available_domains")
@Override
public @Nullable List getAvailableDomains() {
return availableDomains;
}
/**
* The detected buildpack
*/
@JsonProperty("detected_buildpack")
@Override
public @Nullable String getDetectedBuildpack() {
return detectedBuildpack;
}
/**
* The detected buildpack id
*/
@JsonProperty("detected_buildpack_guid")
@Override
public @Nullable String getDetectedBuildpackId() {
return detectedBuildpackId;
}
/**
* Whether SSH is enabled
*/
@JsonProperty("enable_ssh")
@Override
public @Nullable Boolean getEnableSsh() {
return enableSsh;
}
/**
* The id
*/
@JsonProperty("guid")
@Override
public @Nullable String getId() {
return id;
}
/**
* The package state
*/
@JsonProperty("package_state")
@Override
public @Nullable String getPackageState() {
return packageState;
}
/**
* When the package was update
*/
@JsonProperty("package_updated_at")
@Override
public @Nullable String getPackageUpdatedAt() {
return packageUpdatedAt;
}
/**
* The ports
*/
@JsonProperty("ports")
@Override
public @Nullable List getPorts() {
return ports;
}
/**
* The routes
*/
@JsonProperty("routes")
@Override
public @Nullable List getRoutes() {
return routes;
}
/**
* The running instances
*/
@JsonProperty("running_instances")
@Override
public @Nullable Integer getRunningInstances() {
return runningInstances;
}
/**
* The services
*/
@JsonProperty("services")
@Override
public @Nullable List getServices() {
return services;
}
/**
* The version
*/
@JsonProperty("version")
@Override
public @Nullable String getVersion() {
return version;
}
/**
* The log rate limit
*/
@JsonProperty("log_rate_limit")
@Override
public @Nullable Integer getLogRateLimit() {
return logRateLimit;
}
/**
* This instance is equal to all instances of {@code SummaryApplicationResponse} that have equal attribute values.
* @return {@code true} if {@code this} is equal to {@code another} instance
*/
@Override
public boolean equals(Object another) {
if (this == another) return true;
return another instanceof SummaryApplicationResponse
&& equalTo(0, (SummaryApplicationResponse) another);
}
private boolean equalTo(int synthetic, SummaryApplicationResponse another) {
return Objects.equals(buildpack, another.buildpack)
&& Objects.equals(command, another.command)
&& Objects.equals(console, another.console)
&& Objects.equals(debug, another.debug)
&& Objects.equals(detectedStartCommand, another.detectedStartCommand)
&& Objects.equals(diego, another.diego)
&& Objects.equals(diskQuota, another.diskQuota)
&& Objects.equals(dockerCredentials, another.dockerCredentials)
&& Objects.equals(dockerImage, another.dockerImage)
&& Objects.equals(environmentJsons, another.environmentJsons)
&& Objects.equals(healthCheckHttpEndpoint, another.healthCheckHttpEndpoint)
&& Objects.equals(healthCheckTimeout, another.healthCheckTimeout)
&& Objects.equals(healthCheckType, another.healthCheckType)
&& Objects.equals(instances, another.instances)
&& Objects.equals(memory, another.memory)
&& Objects.equals(name, another.name)
&& Objects.equals(production, another.production)
&& Objects.equals(spaceId, another.spaceId)
&& Objects.equals(stackId, another.stackId)
&& Objects.equals(stagingFailedDescription, another.stagingFailedDescription)
&& Objects.equals(stagingFailedReason, another.stagingFailedReason)
&& Objects.equals(stagingTaskId, another.stagingTaskId)
&& Objects.equals(state, another.state)
&& Objects.equals(availableDomains, another.availableDomains)
&& Objects.equals(detectedBuildpack, another.detectedBuildpack)
&& Objects.equals(detectedBuildpackId, another.detectedBuildpackId)
&& Objects.equals(enableSsh, another.enableSsh)
&& Objects.equals(id, another.id)
&& Objects.equals(packageState, another.packageState)
&& Objects.equals(packageUpdatedAt, another.packageUpdatedAt)
&& Objects.equals(ports, another.ports)
&& Objects.equals(routes, another.routes)
&& Objects.equals(runningInstances, another.runningInstances)
&& Objects.equals(services, another.services)
&& Objects.equals(version, another.version)
&& Objects.equals(logRateLimit, another.logRateLimit);
}
/**
* Computes a hash code from attributes: {@code buildpack}, {@code command}, {@code console}, {@code debug}, {@code detectedStartCommand}, {@code diego}, {@code diskQuota}, {@code dockerCredentials}, {@code dockerImage}, {@code environmentJsons}, {@code healthCheckHttpEndpoint}, {@code healthCheckTimeout}, {@code healthCheckType}, {@code instances}, {@code memory}, {@code name}, {@code production}, {@code spaceId}, {@code stackId}, {@code stagingFailedDescription}, {@code stagingFailedReason}, {@code stagingTaskId}, {@code state}, {@code availableDomains}, {@code detectedBuildpack}, {@code detectedBuildpackId}, {@code enableSsh}, {@code id}, {@code packageState}, {@code packageUpdatedAt}, {@code ports}, {@code routes}, {@code runningInstances}, {@code services}, {@code version}, {@code logRateLimit}.
* @return hashCode value
*/
@Override
public int hashCode() {
int h = 5381;
h += (h << 5) + Objects.hashCode(buildpack);
h += (h << 5) + Objects.hashCode(command);
h += (h << 5) + Objects.hashCode(console);
h += (h << 5) + Objects.hashCode(debug);
h += (h << 5) + Objects.hashCode(detectedStartCommand);
h += (h << 5) + Objects.hashCode(diego);
h += (h << 5) + Objects.hashCode(diskQuota);
h += (h << 5) + Objects.hashCode(dockerCredentials);
h += (h << 5) + Objects.hashCode(dockerImage);
h += (h << 5) + Objects.hashCode(environmentJsons);
h += (h << 5) + Objects.hashCode(healthCheckHttpEndpoint);
h += (h << 5) + Objects.hashCode(healthCheckTimeout);
h += (h << 5) + Objects.hashCode(healthCheckType);
h += (h << 5) + Objects.hashCode(instances);
h += (h << 5) + Objects.hashCode(memory);
h += (h << 5) + Objects.hashCode(name);
h += (h << 5) + Objects.hashCode(production);
h += (h << 5) + Objects.hashCode(spaceId);
h += (h << 5) + Objects.hashCode(stackId);
h += (h << 5) + Objects.hashCode(stagingFailedDescription);
h += (h << 5) + Objects.hashCode(stagingFailedReason);
h += (h << 5) + Objects.hashCode(stagingTaskId);
h += (h << 5) + Objects.hashCode(state);
h += (h << 5) + Objects.hashCode(availableDomains);
h += (h << 5) + Objects.hashCode(detectedBuildpack);
h += (h << 5) + Objects.hashCode(detectedBuildpackId);
h += (h << 5) + Objects.hashCode(enableSsh);
h += (h << 5) + Objects.hashCode(id);
h += (h << 5) + Objects.hashCode(packageState);
h += (h << 5) + Objects.hashCode(packageUpdatedAt);
h += (h << 5) + Objects.hashCode(ports);
h += (h << 5) + Objects.hashCode(routes);
h += (h << 5) + Objects.hashCode(runningInstances);
h += (h << 5) + Objects.hashCode(services);
h += (h << 5) + Objects.hashCode(version);
h += (h << 5) + Objects.hashCode(logRateLimit);
return h;
}
/**
* Prints the immutable value {@code SummaryApplicationResponse} with attribute values.
* @return A string representation of the value
*/
@Override
public String toString() {
return "SummaryApplicationResponse{"
+ "buildpack=" + buildpack
+ ", command=" + command
+ ", console=" + console
+ ", debug=" + debug
+ ", detectedStartCommand=" + detectedStartCommand
+ ", diego=" + diego
+ ", diskQuota=" + diskQuota
+ ", dockerCredentials=" + dockerCredentials
+ ", dockerImage=" + dockerImage
+ ", environmentJsons=" + environmentJsons
+ ", healthCheckHttpEndpoint=" + healthCheckHttpEndpoint
+ ", healthCheckTimeout=" + healthCheckTimeout
+ ", healthCheckType=" + healthCheckType
+ ", instances=" + instances
+ ", memory=" + memory
+ ", name=" + name
+ ", production=" + production
+ ", spaceId=" + spaceId
+ ", stackId=" + stackId
+ ", stagingFailedDescription=" + stagingFailedDescription
+ ", stagingFailedReason=" + stagingFailedReason
+ ", stagingTaskId=" + stagingTaskId
+ ", state=" + state
+ ", availableDomains=" + availableDomains
+ ", detectedBuildpack=" + detectedBuildpack
+ ", detectedBuildpackId=" + detectedBuildpackId
+ ", enableSsh=" + enableSsh
+ ", id=" + id
+ ", packageState=" + packageState
+ ", packageUpdatedAt=" + packageUpdatedAt
+ ", ports=" + ports
+ ", routes=" + routes
+ ", runningInstances=" + runningInstances
+ ", services=" + services
+ ", version=" + version
+ ", logRateLimit=" + logRateLimit
+ "}";
}
/**
* Utility type used to correctly read immutable object from JSON representation.
* @deprecated Do not use this type directly, it exists only for the Jackson-binding infrastructure
*/
@Generated(from = "_SummaryApplicationResponse", generator = "Immutables")
@Deprecated
@JsonDeserialize
@JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE)
static final class Json extends org.cloudfoundry.client.v2.applications._SummaryApplicationResponse {
String buildpack;
String command;
Boolean console;
String debug;
String detectedStartCommand;
Boolean diego;
Integer diskQuota;
DockerCredentials dockerCredentials;
String dockerImage;
Map environmentJsons = null;
String healthCheckHttpEndpoint;
Integer healthCheckTimeout;
String healthCheckType;
Integer instances;
Integer memory;
String name;
Boolean production;
String spaceId;
String stackId;
String stagingFailedDescription;
String stagingFailedReason;
String stagingTaskId;
String state;
List availableDomains = null;
String detectedBuildpack;
String detectedBuildpackId;
Boolean enableSsh;
String id;
String packageState;
String packageUpdatedAt;
List ports = null;
List routes = null;
Integer runningInstances;
List services = null;
String version;
Integer logRateLimit;
@JsonProperty("buildpack")
public void setBuildpack(@Nullable String buildpack) {
this.buildpack = buildpack;
}
@JsonProperty("command")
public void setCommand(@Nullable String command) {
this.command = command;
}
@JsonProperty("console")
public void setConsole(@Nullable Boolean console) {
this.console = console;
}
@JsonProperty("debug")
public void setDebug(@Nullable String debug) {
this.debug = debug;
}
@JsonProperty("detected_start_command")
public void setDetectedStartCommand(@Nullable String detectedStartCommand) {
this.detectedStartCommand = detectedStartCommand;
}
@JsonProperty("diego")
public void setDiego(@Nullable Boolean diego) {
this.diego = diego;
}
@JsonProperty("disk_quota")
public void setDiskQuota(@Nullable Integer diskQuota) {
this.diskQuota = diskQuota;
}
@JsonProperty("docker_credentials")
public void setDockerCredentials(@Nullable DockerCredentials dockerCredentials) {
this.dockerCredentials = dockerCredentials;
}
@JsonProperty("docker_image")
public void setDockerImage(@Nullable String dockerImage) {
this.dockerImage = dockerImage;
}
@JsonProperty("environment_json")
public void setEnvironmentJsons(@Nullable Map environmentJsons) {
this.environmentJsons = environmentJsons;
}
@JsonProperty("health_check_http_endpoint")
public void setHealthCheckHttpEndpoint(@Nullable String healthCheckHttpEndpoint) {
this.healthCheckHttpEndpoint = healthCheckHttpEndpoint;
}
@JsonProperty("health_check_timeout")
public void setHealthCheckTimeout(@Nullable Integer healthCheckTimeout) {
this.healthCheckTimeout = healthCheckTimeout;
}
@JsonProperty("health_check_type")
public void setHealthCheckType(@Nullable String healthCheckType) {
this.healthCheckType = healthCheckType;
}
@JsonProperty("instances")
public void setInstances(@Nullable Integer instances) {
this.instances = instances;
}
@JsonProperty("memory")
public void setMemory(@Nullable Integer memory) {
this.memory = memory;
}
@JsonProperty("name")
public void setName(@Nullable String name) {
this.name = name;
}
@JsonProperty("production")
public void setProduction(@Nullable Boolean production) {
this.production = production;
}
@JsonProperty("space_guid")
public void setSpaceId(@Nullable String spaceId) {
this.spaceId = spaceId;
}
@JsonProperty("stack_guid")
public void setStackId(@Nullable String stackId) {
this.stackId = stackId;
}
@JsonProperty("staging_failed_description")
public void setStagingFailedDescription(@Nullable String stagingFailedDescription) {
this.stagingFailedDescription = stagingFailedDescription;
}
@JsonProperty("staging_failed_reason")
public void setStagingFailedReason(@Nullable String stagingFailedReason) {
this.stagingFailedReason = stagingFailedReason;
}
@JsonProperty("staging_task_id")
public void setStagingTaskId(@Nullable String stagingTaskId) {
this.stagingTaskId = stagingTaskId;
}
@JsonProperty("state")
public void setState(@Nullable String state) {
this.state = state;
}
@JsonProperty("available_domains")
public void setAvailableDomains(@Nullable List availableDomains) {
this.availableDomains = availableDomains;
}
@JsonProperty("detected_buildpack")
public void setDetectedBuildpack(@Nullable String detectedBuildpack) {
this.detectedBuildpack = detectedBuildpack;
}
@JsonProperty("detected_buildpack_guid")
public void setDetectedBuildpackId(@Nullable String detectedBuildpackId) {
this.detectedBuildpackId = detectedBuildpackId;
}
@JsonProperty("enable_ssh")
public void setEnableSsh(@Nullable Boolean enableSsh) {
this.enableSsh = enableSsh;
}
@JsonProperty("guid")
public void setId(@Nullable String id) {
this.id = id;
}
@JsonProperty("package_state")
public void setPackageState(@Nullable String packageState) {
this.packageState = packageState;
}
@JsonProperty("package_updated_at")
public void setPackageUpdatedAt(@Nullable String packageUpdatedAt) {
this.packageUpdatedAt = packageUpdatedAt;
}
@JsonProperty("ports")
public void setPorts(@Nullable List ports) {
this.ports = ports;
}
@JsonProperty("routes")
public void setRoutes(@Nullable List routes) {
this.routes = routes;
}
@JsonProperty("running_instances")
public void setRunningInstances(@Nullable Integer runningInstances) {
this.runningInstances = runningInstances;
}
@JsonProperty("services")
public void setServices(@Nullable List services) {
this.services = services;
}
@JsonProperty("version")
public void setVersion(@Nullable String version) {
this.version = version;
}
@JsonProperty("log_rate_limit")
public void setLogRateLimit(@Nullable Integer logRateLimit) {
this.logRateLimit = logRateLimit;
}
@Override
public String getBuildpack() { throw new UnsupportedOperationException(); }
@Override
public String getCommand() { throw new UnsupportedOperationException(); }
@Override
public Boolean getConsole() { throw new UnsupportedOperationException(); }
@Override
public String getDebug() { throw new UnsupportedOperationException(); }
@Override
public String getDetectedStartCommand() { throw new UnsupportedOperationException(); }
@Override
public Boolean getDiego() { throw new UnsupportedOperationException(); }
@Override
public Integer getDiskQuota() { throw new UnsupportedOperationException(); }
@Override
public DockerCredentials getDockerCredentials() { throw new UnsupportedOperationException(); }
@Override
public String getDockerImage() { throw new UnsupportedOperationException(); }
@Override
public Map getEnvironmentJsons() { throw new UnsupportedOperationException(); }
@Override
public String getHealthCheckHttpEndpoint() { throw new UnsupportedOperationException(); }
@Override
public Integer getHealthCheckTimeout() { throw new UnsupportedOperationException(); }
@Override
public String getHealthCheckType() { throw new UnsupportedOperationException(); }
@Override
public Integer getInstances() { throw new UnsupportedOperationException(); }
@Override
public Integer getMemory() { throw new UnsupportedOperationException(); }
@Override
public String getName() { throw new UnsupportedOperationException(); }
@Override
public Boolean getProduction() { throw new UnsupportedOperationException(); }
@Override
public String getSpaceId() { throw new UnsupportedOperationException(); }
@Override
public String getStackId() { throw new UnsupportedOperationException(); }
@Override
public String getStagingFailedDescription() { throw new UnsupportedOperationException(); }
@Override
public String getStagingFailedReason() { throw new UnsupportedOperationException(); }
@Override
public String getStagingTaskId() { throw new UnsupportedOperationException(); }
@Override
public String getState() { throw new UnsupportedOperationException(); }
@Override
public List getAvailableDomains() { throw new UnsupportedOperationException(); }
@Override
public String getDetectedBuildpack() { throw new UnsupportedOperationException(); }
@Override
public String getDetectedBuildpackId() { throw new UnsupportedOperationException(); }
@Override
public Boolean getEnableSsh() { throw new UnsupportedOperationException(); }
@Override
public String getId() { throw new UnsupportedOperationException(); }
@Override
public String getPackageState() { throw new UnsupportedOperationException(); }
@Override
public String getPackageUpdatedAt() { throw new UnsupportedOperationException(); }
@Override
public List getPorts() { throw new UnsupportedOperationException(); }
@Override
public List getRoutes() { throw new UnsupportedOperationException(); }
@Override
public Integer getRunningInstances() { throw new UnsupportedOperationException(); }
@Override
public List getServices() { throw new UnsupportedOperationException(); }
@Override
public String getVersion() { throw new UnsupportedOperationException(); }
@Override
public Integer getLogRateLimit() { throw new UnsupportedOperationException(); }
}
/**
* @param json A JSON-bindable data structure
* @return An immutable value type
* @deprecated Do not use this method directly, it exists only for the Jackson-binding infrastructure
*/
@Deprecated
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
static SummaryApplicationResponse fromJson(Json json) {
SummaryApplicationResponse.Builder builder = SummaryApplicationResponse.builder();
if (json.buildpack != null) {
builder.buildpack(json.buildpack);
}
if (json.command != null) {
builder.command(json.command);
}
if (json.console != null) {
builder.console(json.console);
}
if (json.debug != null) {
builder.debug(json.debug);
}
if (json.detectedStartCommand != null) {
builder.detectedStartCommand(json.detectedStartCommand);
}
if (json.diego != null) {
builder.diego(json.diego);
}
if (json.diskQuota != null) {
builder.diskQuota(json.diskQuota);
}
if (json.dockerCredentials != null) {
builder.dockerCredentials(json.dockerCredentials);
}
if (json.dockerImage != null) {
builder.dockerImage(json.dockerImage);
}
if (json.environmentJsons != null) {
builder.putAllEnvironmentJsons(json.environmentJsons);
}
if (json.healthCheckHttpEndpoint != null) {
builder.healthCheckHttpEndpoint(json.healthCheckHttpEndpoint);
}
if (json.healthCheckTimeout != null) {
builder.healthCheckTimeout(json.healthCheckTimeout);
}
if (json.healthCheckType != null) {
builder.healthCheckType(json.healthCheckType);
}
if (json.instances != null) {
builder.instances(json.instances);
}
if (json.memory != null) {
builder.memory(json.memory);
}
if (json.name != null) {
builder.name(json.name);
}
if (json.production != null) {
builder.production(json.production);
}
if (json.spaceId != null) {
builder.spaceId(json.spaceId);
}
if (json.stackId != null) {
builder.stackId(json.stackId);
}
if (json.stagingFailedDescription != null) {
builder.stagingFailedDescription(json.stagingFailedDescription);
}
if (json.stagingFailedReason != null) {
builder.stagingFailedReason(json.stagingFailedReason);
}
if (json.stagingTaskId != null) {
builder.stagingTaskId(json.stagingTaskId);
}
if (json.state != null) {
builder.state(json.state);
}
if (json.availableDomains != null) {
builder.addAllAvailableDomains(json.availableDomains);
}
if (json.detectedBuildpack != null) {
builder.detectedBuildpack(json.detectedBuildpack);
}
if (json.detectedBuildpackId != null) {
builder.detectedBuildpackId(json.detectedBuildpackId);
}
if (json.enableSsh != null) {
builder.enableSsh(json.enableSsh);
}
if (json.id != null) {
builder.id(json.id);
}
if (json.packageState != null) {
builder.packageState(json.packageState);
}
if (json.packageUpdatedAt != null) {
builder.packageUpdatedAt(json.packageUpdatedAt);
}
if (json.ports != null) {
builder.addAllPorts(json.ports);
}
if (json.routes != null) {
builder.addAllRoutes(json.routes);
}
if (json.runningInstances != null) {
builder.runningInstances(json.runningInstances);
}
if (json.services != null) {
builder.addAllServices(json.services);
}
if (json.version != null) {
builder.version(json.version);
}
if (json.logRateLimit != null) {
builder.logRateLimit(json.logRateLimit);
}
return builder.build();
}
/**
* Creates a builder for {@link SummaryApplicationResponse SummaryApplicationResponse}.
*
* SummaryApplicationResponse.builder()
* .buildpack(String | null) // nullable {@link SummaryApplicationResponse#getBuildpack() buildpack}
* .command(String | null) // nullable {@link SummaryApplicationResponse#getCommand() command}
* .console(Boolean | null) // nullable {@link SummaryApplicationResponse#getConsole() console}
* .debug(String | null) // nullable {@link SummaryApplicationResponse#getDebug() debug}
* .detectedStartCommand(String | null) // nullable {@link SummaryApplicationResponse#getDetectedStartCommand() detectedStartCommand}
* .diego(Boolean | null) // nullable {@link SummaryApplicationResponse#getDiego() diego}
* .diskQuota(Integer | null) // nullable {@link SummaryApplicationResponse#getDiskQuota() diskQuota}
* .dockerCredentials(org.cloudfoundry.client.v2.applications.DockerCredentials | null) // nullable {@link SummaryApplicationResponse#getDockerCredentials() dockerCredentials}
* .dockerImage(String | null) // nullable {@link SummaryApplicationResponse#getDockerImage() dockerImage}
* .environmentJsons(Map<String, Object> | null) // nullable {@link SummaryApplicationResponse#getEnvironmentJsons() environmentJsons}
* .healthCheckHttpEndpoint(String | null) // nullable {@link SummaryApplicationResponse#getHealthCheckHttpEndpoint() healthCheckHttpEndpoint}
* .healthCheckTimeout(Integer | null) // nullable {@link SummaryApplicationResponse#getHealthCheckTimeout() healthCheckTimeout}
* .healthCheckType(String | null) // nullable {@link SummaryApplicationResponse#getHealthCheckType() healthCheckType}
* .instances(Integer | null) // nullable {@link SummaryApplicationResponse#getInstances() instances}
* .memory(Integer | null) // nullable {@link SummaryApplicationResponse#getMemory() memory}
* .name(String | null) // nullable {@link SummaryApplicationResponse#getName() name}
* .production(Boolean | null) // nullable {@link SummaryApplicationResponse#getProduction() production}
* .spaceId(String | null) // nullable {@link SummaryApplicationResponse#getSpaceId() spaceId}
* .stackId(String | null) // nullable {@link SummaryApplicationResponse#getStackId() stackId}
* .stagingFailedDescription(String | null) // nullable {@link SummaryApplicationResponse#getStagingFailedDescription() stagingFailedDescription}
* .stagingFailedReason(String | null) // nullable {@link SummaryApplicationResponse#getStagingFailedReason() stagingFailedReason}
* .stagingTaskId(String | null) // nullable {@link SummaryApplicationResponse#getStagingTaskId() stagingTaskId}
* .state(String | null) // nullable {@link SummaryApplicationResponse#getState() state}
* .availableDomains(List<org.cloudfoundry.client.v2.domains.Domain> | null) // nullable {@link SummaryApplicationResponse#getAvailableDomains() availableDomains}
* .detectedBuildpack(String | null) // nullable {@link SummaryApplicationResponse#getDetectedBuildpack() detectedBuildpack}
* .detectedBuildpackId(String | null) // nullable {@link SummaryApplicationResponse#getDetectedBuildpackId() detectedBuildpackId}
* .enableSsh(Boolean | null) // nullable {@link SummaryApplicationResponse#getEnableSsh() enableSsh}
* .id(String | null) // nullable {@link SummaryApplicationResponse#getId() id}
* .packageState(String | null) // nullable {@link SummaryApplicationResponse#getPackageState() packageState}
* .packageUpdatedAt(String | null) // nullable {@link SummaryApplicationResponse#getPackageUpdatedAt() packageUpdatedAt}
* .ports(List<Integer> | null) // nullable {@link SummaryApplicationResponse#getPorts() ports}
* .routes(List<org.cloudfoundry.client.v2.routes.Route> | null) // nullable {@link SummaryApplicationResponse#getRoutes() routes}
* .runningInstances(Integer | null) // nullable {@link SummaryApplicationResponse#getRunningInstances() runningInstances}
* .services(List<org.cloudfoundry.client.v2.serviceinstances.ServiceInstance> | null) // nullable {@link SummaryApplicationResponse#getServices() services}
* .version(String | null) // nullable {@link SummaryApplicationResponse#getVersion() version}
* .logRateLimit(Integer | null) // nullable {@link SummaryApplicationResponse#getLogRateLimit() logRateLimit}
* .build();
*
* @return A new SummaryApplicationResponse builder
*/
public static SummaryApplicationResponse.Builder builder() {
return new SummaryApplicationResponse.Builder();
}
/**
* Builds instances of type {@link SummaryApplicationResponse SummaryApplicationResponse}.
* Initialize attributes and then invoke the {@link #build()} method to create an
* immutable instance.
* {@code Builder} is not thread-safe and generally should not be stored in a field or collection,
* but instead used immediately to create instances.
*/
@Generated(from = "_SummaryApplicationResponse", generator = "Immutables")
public static final class Builder {
private String buildpack;
private String command;
private Boolean console;
private String debug;
private String detectedStartCommand;
private Boolean diego;
private Integer diskQuota;
private DockerCredentials dockerCredentials;
private String dockerImage;
private Map environmentJsons = null;
private String healthCheckHttpEndpoint;
private Integer healthCheckTimeout;
private String healthCheckType;
private Integer instances;
private Integer memory;
private String name;
private Boolean production;
private String spaceId;
private String stackId;
private String stagingFailedDescription;
private String stagingFailedReason;
private String stagingTaskId;
private String state;
private List availableDomains = null;
private String detectedBuildpack;
private String detectedBuildpackId;
private Boolean enableSsh;
private String id;
private String packageState;
private String packageUpdatedAt;
private List ports = null;
private List routes = null;
private Integer runningInstances;
private List services = null;
private String version;
private Integer logRateLimit;
private Builder() {
}
/**
* Fill a builder with attribute values from the provided {@code SummaryApplicationResponse} instance.
* @param instance The instance from which to copy values
* @return {@code this} builder for use in a chained invocation
*/
public final Builder from(SummaryApplicationResponse instance) {
Objects.requireNonNull(instance, "instance");
from((short) 0, (Object) instance);
return this;
}
/**
* Copy abstract value type {@code _SummaryApplicationResponse} instance into builder.
* @param instance The instance from which to copy values
* @return {@code this} builder for use in a chained invocation
*/
public final Builder from(_SummaryApplicationResponse instance) {
Objects.requireNonNull(instance, "instance");
from((short) 0, (Object) instance);
return this;
}
/**
* Fill a builder with attribute values from the provided {@code org.cloudfoundry.client.v2.applications.AbstractApplicationEntity} instance.
* @param instance The instance from which to copy values
* @return {@code this} builder for use in a chained invocation
*/
public final Builder from(AbstractApplicationEntity instance) {
Objects.requireNonNull(instance, "instance");
from((short) 0, (Object) instance);
return this;
}
private void from(short _unused, Object object) {
if (object instanceof org.cloudfoundry.client.v2.applications._SummaryApplicationResponse) {
org.cloudfoundry.client.v2.applications._SummaryApplicationResponse instance = (org.cloudfoundry.client.v2.applications._SummaryApplicationResponse) object;
String detectedBuildpackValue = instance.getDetectedBuildpack();
if (detectedBuildpackValue != null) {
detectedBuildpack(detectedBuildpackValue);
}
Integer logRateLimitValue = instance.getLogRateLimit();
if (logRateLimitValue != null) {
logRateLimit(logRateLimitValue);
}
String packageUpdatedAtValue = instance.getPackageUpdatedAt();
if (packageUpdatedAtValue != null) {
packageUpdatedAt(packageUpdatedAtValue);
}
List servicesValue = instance.getServices();
if (servicesValue != null) {
addAllServices(servicesValue);
}
List portsValue = instance.getPorts();
if (portsValue != null) {
addAllPorts(portsValue);
}
Integer runningInstancesValue = instance.getRunningInstances();
if (runningInstancesValue != null) {
runningInstances(runningInstancesValue);
}
String versionValue = instance.getVersion();
if (versionValue != null) {
version(versionValue);
}
List routesValue = instance.getRoutes();
if (routesValue != null) {
addAllRoutes(routesValue);
}
String detectedBuildpackIdValue = instance.getDetectedBuildpackId();
if (detectedBuildpackIdValue != null) {
detectedBuildpackId(detectedBuildpackIdValue);
}
String idValue = instance.getId();
if (idValue != null) {
id(idValue);
}
Boolean enableSshValue = instance.getEnableSsh();
if (enableSshValue != null) {
enableSsh(enableSshValue);
}
List availableDomainsValue = instance.getAvailableDomains();
if (availableDomainsValue != null) {
addAllAvailableDomains(availableDomainsValue);
}
String packageStateValue = instance.getPackageState();
if (packageStateValue != null) {
packageState(packageStateValue);
}
}
if (object instanceof AbstractApplicationEntity) {
AbstractApplicationEntity instance = (AbstractApplicationEntity) object;
Integer healthCheckTimeoutValue = instance.getHealthCheckTimeout();
if (healthCheckTimeoutValue != null) {
healthCheckTimeout(healthCheckTimeoutValue);
}
String healthCheckTypeValue = instance.getHealthCheckType();
if (healthCheckTypeValue != null) {
healthCheckType(healthCheckTypeValue);
}
Boolean consoleValue = instance.getConsole();
if (consoleValue != null) {
console(consoleValue);
}
String stagingFailedReasonValue = instance.getStagingFailedReason();
if (stagingFailedReasonValue != null) {
stagingFailedReason(stagingFailedReasonValue);
}
String dockerImageValue = instance.getDockerImage();
if (dockerImageValue != null) {
dockerImage(dockerImageValue);
}
Integer memoryValue = instance.getMemory();
if (memoryValue != null) {
memory(memoryValue);
}
String debugValue = instance.getDebug();
if (debugValue != null) {
debug(debugValue);
}
Integer instancesValue = instance.getInstances();
if (instancesValue != null) {
instances(instancesValue);
}
Boolean productionValue = instance.getProduction();
if (productionValue != null) {
production(productionValue);
}
String stackIdValue = instance.getStackId();
if (stackIdValue != null) {
stackId(stackIdValue);
}
String detectedStartCommandValue = instance.getDetectedStartCommand();
if (detectedStartCommandValue != null) {
detectedStartCommand(detectedStartCommandValue);
}
DockerCredentials dockerCredentialsValue = instance.getDockerCredentials();
if (dockerCredentialsValue != null) {
dockerCredentials(dockerCredentialsValue);
}
String buildpackValue = instance.getBuildpack();
if (buildpackValue != null) {
buildpack(buildpackValue);
}
String stagingFailedDescriptionValue = instance.getStagingFailedDescription();
if (stagingFailedDescriptionValue != null) {
stagingFailedDescription(stagingFailedDescriptionValue);
}
String commandValue = instance.getCommand();
if (commandValue != null) {
command(commandValue);
}
String spaceIdValue = instance.getSpaceId();
if (spaceIdValue != null) {
spaceId(spaceIdValue);
}
String healthCheckHttpEndpointValue = instance.getHealthCheckHttpEndpoint();
if (healthCheckHttpEndpointValue != null) {
healthCheckHttpEndpoint(healthCheckHttpEndpointValue);
}
String nameValue = instance.getName();
if (nameValue != null) {
name(nameValue);
}
Boolean diegoValue = instance.getDiego();
if (diegoValue != null) {
diego(diegoValue);
}
Map environmentJsonsValue = instance.getEnvironmentJsons();
if (environmentJsonsValue != null) {
putAllEnvironmentJsons(environmentJsonsValue);
}
String stateValue = instance.getState();
if (stateValue != null) {
state(stateValue);
}
String stagingTaskIdValue = instance.getStagingTaskId();
if (stagingTaskIdValue != null) {
stagingTaskId(stagingTaskIdValue);
}
Integer diskQuotaValue = instance.getDiskQuota();
if (diskQuotaValue != null) {
diskQuota(diskQuotaValue);
}
}
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getBuildpack() buildpack} attribute.
* @param buildpack The value for buildpack (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("buildpack")
public final Builder buildpack(@Nullable String buildpack) {
this.buildpack = buildpack;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getCommand() command} attribute.
* @param command The value for command (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("command")
public final Builder command(@Nullable String command) {
this.command = command;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getConsole() console} attribute.
* @param console The value for console (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("console")
@Deprecated
public final Builder console(@Nullable Boolean console) {
this.console = console;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDebug() debug} attribute.
* @param debug The value for debug (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("debug")
@Deprecated
public final Builder debug(@Nullable String debug) {
this.debug = debug;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDetectedStartCommand() detectedStartCommand} attribute.
* @param detectedStartCommand The value for detectedStartCommand (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("detected_start_command")
public final Builder detectedStartCommand(@Nullable String detectedStartCommand) {
this.detectedStartCommand = detectedStartCommand;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDiego() diego} attribute.
* @param diego The value for diego (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("diego")
public final Builder diego(@Nullable Boolean diego) {
this.diego = diego;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDiskQuota() diskQuota} attribute.
* @param diskQuota The value for diskQuota (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("disk_quota")
public final Builder diskQuota(@Nullable Integer diskQuota) {
this.diskQuota = diskQuota;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDockerCredentials() dockerCredentials} attribute.
* @param dockerCredentials The value for dockerCredentials (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("docker_credentials")
public final Builder dockerCredentials(@Nullable DockerCredentials dockerCredentials) {
this.dockerCredentials = dockerCredentials;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDockerImage() dockerImage} attribute.
* @param dockerImage The value for dockerImage (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("docker_image")
public final Builder dockerImage(@Nullable String dockerImage) {
this.dockerImage = dockerImage;
return this;
}
/**
* Put one entry to the {@link SummaryApplicationResponse#getEnvironmentJsons() environmentJsons} map.
* @param key The key in the environmentJsons map
* @param value The associated value in the environmentJsons map
* @return {@code this} builder for use in a chained invocation
*/
public final Builder environmentJson(String key, Object value) {
if (this.environmentJsons == null) {
this.environmentJsons = new LinkedHashMap();
}
this.environmentJsons.put(key, value);
return this;
}
/**
* Put one entry to the {@link SummaryApplicationResponse#getEnvironmentJsons() environmentJsons} map. Nulls are not permitted
* @param entry The key and value entry
* @return {@code this} builder for use in a chained invocation
*/
public final Builder environmentJson(Map.Entry entry) {
if (this.environmentJsons == null) {
this.environmentJsons = new LinkedHashMap();
}
String k = entry.getKey();
Object v = entry.getValue();
this.environmentJsons.put(k, v);
return this;
}
/**
* Sets or replaces all mappings from the specified map as entries for the {@link SummaryApplicationResponse#getEnvironmentJsons() environmentJsons} map. Nulls are not permitted as keys or values, but parameter itself can be null
* @param entries The entries that will be added to the environmentJsons map
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("environment_json")
public final Builder environmentJsons(@Nullable Map entries) {
if (entries == null) {
this.environmentJsons = null;
return this;
}
this.environmentJsons = new LinkedHashMap();
return putAllEnvironmentJsons(entries);
}
/**
* Put all mappings from the specified map as entries to {@link SummaryApplicationResponse#getEnvironmentJsons() environmentJsons} map. Nulls are not permitted
* @param entries The entries that will be added to the environmentJsons map
* @return {@code this} builder for use in a chained invocation
*/
public final Builder putAllEnvironmentJsons(Map entries) {
if (this.environmentJsons == null) {
this.environmentJsons = new LinkedHashMap();
}
for (Map.Entry e : entries.entrySet()) {
String k = e.getKey();
Object v = e.getValue();
this.environmentJsons.put(k, v);
}
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getHealthCheckHttpEndpoint() healthCheckHttpEndpoint} attribute.
* @param healthCheckHttpEndpoint The value for healthCheckHttpEndpoint (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("health_check_http_endpoint")
public final Builder healthCheckHttpEndpoint(@Nullable String healthCheckHttpEndpoint) {
this.healthCheckHttpEndpoint = healthCheckHttpEndpoint;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getHealthCheckTimeout() healthCheckTimeout} attribute.
* @param healthCheckTimeout The value for healthCheckTimeout (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("health_check_timeout")
public final Builder healthCheckTimeout(@Nullable Integer healthCheckTimeout) {
this.healthCheckTimeout = healthCheckTimeout;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getHealthCheckType() healthCheckType} attribute.
* @param healthCheckType The value for healthCheckType (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("health_check_type")
public final Builder healthCheckType(@Nullable String healthCheckType) {
this.healthCheckType = healthCheckType;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getInstances() instances} attribute.
* @param instances The value for instances (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("instances")
public final Builder instances(@Nullable Integer instances) {
this.instances = instances;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getMemory() memory} attribute.
* @param memory The value for memory (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("memory")
public final Builder memory(@Nullable Integer memory) {
this.memory = memory;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getName() name} attribute.
* @param name The value for name (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("name")
public final Builder name(@Nullable String name) {
this.name = name;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getProduction() production} attribute.
* @param production The value for production (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("production")
@Deprecated
public final Builder production(@Nullable Boolean production) {
this.production = production;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getSpaceId() spaceId} attribute.
* @param spaceId The value for spaceId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("space_guid")
public final Builder spaceId(@Nullable String spaceId) {
this.spaceId = spaceId;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getStackId() stackId} attribute.
* @param stackId The value for stackId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("stack_guid")
public final Builder stackId(@Nullable String stackId) {
this.stackId = stackId;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getStagingFailedDescription() stagingFailedDescription} attribute.
* @param stagingFailedDescription The value for stagingFailedDescription (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("staging_failed_description")
public final Builder stagingFailedDescription(@Nullable String stagingFailedDescription) {
this.stagingFailedDescription = stagingFailedDescription;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getStagingFailedReason() stagingFailedReason} attribute.
* @param stagingFailedReason The value for stagingFailedReason (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("staging_failed_reason")
public final Builder stagingFailedReason(@Nullable String stagingFailedReason) {
this.stagingFailedReason = stagingFailedReason;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getStagingTaskId() stagingTaskId} attribute.
* @param stagingTaskId The value for stagingTaskId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("staging_task_id")
public final Builder stagingTaskId(@Nullable String stagingTaskId) {
this.stagingTaskId = stagingTaskId;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getState() state} attribute.
* @param state The value for state (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("state")
public final Builder state(@Nullable String state) {
this.state = state;
return this;
}
/**
* Adds one element to {@link SummaryApplicationResponse#getAvailableDomains() availableDomains} list.
* @param element A availableDomains element
* @return {@code this} builder for use in a chained invocation
*/
public final Builder availableDomain(Domain element) {
if (this.availableDomains == null) {
this.availableDomains = new ArrayList();
}
this.availableDomains.add(Objects.requireNonNull(element, "availableDomains element"));
return this;
}
/**
* Adds elements to {@link SummaryApplicationResponse#getAvailableDomains() availableDomains} list.
* @param elements An array of availableDomains elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder availableDomains(Domain... elements) {
if (this.availableDomains == null) {
this.availableDomains = new ArrayList();
}
for (Domain element : elements) {
this.availableDomains.add(Objects.requireNonNull(element, "availableDomains element"));
}
return this;
}
/**
* Sets or replaces all elements for {@link SummaryApplicationResponse#getAvailableDomains() availableDomains} list.
* @param elements An iterable of availableDomains elements
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("available_domains")
public final Builder availableDomains(@Nullable Iterable extends Domain> elements) {
if (elements == null) {
this.availableDomains = null;
return this;
}
this.availableDomains = new ArrayList();
return addAllAvailableDomains(elements);
}
/**
* Adds elements to {@link SummaryApplicationResponse#getAvailableDomains() availableDomains} list.
* @param elements An iterable of availableDomains elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder addAllAvailableDomains(Iterable extends Domain> elements) {
Objects.requireNonNull(elements, "availableDomains element");
if (this.availableDomains == null) {
this.availableDomains = new ArrayList();
}
for (Domain element : elements) {
this.availableDomains.add(Objects.requireNonNull(element, "availableDomains element"));
}
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDetectedBuildpack() detectedBuildpack} attribute.
* @param detectedBuildpack The value for detectedBuildpack (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("detected_buildpack")
public final Builder detectedBuildpack(@Nullable String detectedBuildpack) {
this.detectedBuildpack = detectedBuildpack;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getDetectedBuildpackId() detectedBuildpackId} attribute.
* @param detectedBuildpackId The value for detectedBuildpackId (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("detected_buildpack_guid")
public final Builder detectedBuildpackId(@Nullable String detectedBuildpackId) {
this.detectedBuildpackId = detectedBuildpackId;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getEnableSsh() enableSsh} attribute.
* @param enableSsh The value for enableSsh (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("enable_ssh")
public final Builder enableSsh(@Nullable Boolean enableSsh) {
this.enableSsh = enableSsh;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getId() id} attribute.
* @param id The value for id (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("guid")
public final Builder id(@Nullable String id) {
this.id = id;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getPackageState() packageState} attribute.
* @param packageState The value for packageState (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("package_state")
public final Builder packageState(@Nullable String packageState) {
this.packageState = packageState;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getPackageUpdatedAt() packageUpdatedAt} attribute.
* @param packageUpdatedAt The value for packageUpdatedAt (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("package_updated_at")
public final Builder packageUpdatedAt(@Nullable String packageUpdatedAt) {
this.packageUpdatedAt = packageUpdatedAt;
return this;
}
/**
* Adds one element to {@link SummaryApplicationResponse#getPorts() ports} list.
* @param element A ports element
* @return {@code this} builder for use in a chained invocation
*/
public final Builder port(int element) {
if (this.ports == null) {
this.ports = new ArrayList();
}
this.ports.add(element);
return this;
}
/**
* Adds elements to {@link SummaryApplicationResponse#getPorts() ports} list.
* @param elements An array of ports elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder ports(int... elements) {
if (this.ports == null) {
this.ports = new ArrayList();
}
for (int element : elements) {
this.ports.add(element);
}
return this;
}
/**
* Sets or replaces all elements for {@link SummaryApplicationResponse#getPorts() ports} list.
* @param elements An iterable of ports elements
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("ports")
public final Builder ports(@Nullable Iterable elements) {
if (elements == null) {
this.ports = null;
return this;
}
this.ports = new ArrayList();
return addAllPorts(elements);
}
/**
* Adds elements to {@link SummaryApplicationResponse#getPorts() ports} list.
* @param elements An iterable of ports elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder addAllPorts(Iterable elements) {
Objects.requireNonNull(elements, "ports element");
if (this.ports == null) {
this.ports = new ArrayList();
}
for (Integer element : elements) {
this.ports.add(Objects.requireNonNull(element, "ports element"));
}
return this;
}
/**
* Adds one element to {@link SummaryApplicationResponse#getRoutes() routes} list.
* @param element A routes element
* @return {@code this} builder for use in a chained invocation
*/
public final Builder route(Route element) {
if (this.routes == null) {
this.routes = new ArrayList();
}
this.routes.add(Objects.requireNonNull(element, "routes element"));
return this;
}
/**
* Adds elements to {@link SummaryApplicationResponse#getRoutes() routes} list.
* @param elements An array of routes elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder routes(Route... elements) {
if (this.routes == null) {
this.routes = new ArrayList();
}
for (Route element : elements) {
this.routes.add(Objects.requireNonNull(element, "routes element"));
}
return this;
}
/**
* Sets or replaces all elements for {@link SummaryApplicationResponse#getRoutes() routes} list.
* @param elements An iterable of routes elements
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("routes")
public final Builder routes(@Nullable Iterable extends Route> elements) {
if (elements == null) {
this.routes = null;
return this;
}
this.routes = new ArrayList();
return addAllRoutes(elements);
}
/**
* Adds elements to {@link SummaryApplicationResponse#getRoutes() routes} list.
* @param elements An iterable of routes elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder addAllRoutes(Iterable extends Route> elements) {
Objects.requireNonNull(elements, "routes element");
if (this.routes == null) {
this.routes = new ArrayList();
}
for (Route element : elements) {
this.routes.add(Objects.requireNonNull(element, "routes element"));
}
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getRunningInstances() runningInstances} attribute.
* @param runningInstances The value for runningInstances (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("running_instances")
public final Builder runningInstances(@Nullable Integer runningInstances) {
this.runningInstances = runningInstances;
return this;
}
/**
* Adds one element to {@link SummaryApplicationResponse#getServices() services} list.
* @param element A services element
* @return {@code this} builder for use in a chained invocation
*/
public final Builder service(ServiceInstance element) {
if (this.services == null) {
this.services = new ArrayList();
}
this.services.add(Objects.requireNonNull(element, "services element"));
return this;
}
/**
* Adds elements to {@link SummaryApplicationResponse#getServices() services} list.
* @param elements An array of services elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder services(ServiceInstance... elements) {
if (this.services == null) {
this.services = new ArrayList();
}
for (ServiceInstance element : elements) {
this.services.add(Objects.requireNonNull(element, "services element"));
}
return this;
}
/**
* Sets or replaces all elements for {@link SummaryApplicationResponse#getServices() services} list.
* @param elements An iterable of services elements
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("services")
public final Builder services(@Nullable Iterable extends ServiceInstance> elements) {
if (elements == null) {
this.services = null;
return this;
}
this.services = new ArrayList();
return addAllServices(elements);
}
/**
* Adds elements to {@link SummaryApplicationResponse#getServices() services} list.
* @param elements An iterable of services elements
* @return {@code this} builder for use in a chained invocation
*/
public final Builder addAllServices(Iterable extends ServiceInstance> elements) {
Objects.requireNonNull(elements, "services element");
if (this.services == null) {
this.services = new ArrayList();
}
for (ServiceInstance element : elements) {
this.services.add(Objects.requireNonNull(element, "services element"));
}
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getVersion() version} attribute.
* @param version The value for version (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("version")
public final Builder version(@Nullable String version) {
this.version = version;
return this;
}
/**
* Initializes the value for the {@link SummaryApplicationResponse#getLogRateLimit() logRateLimit} attribute.
* @param logRateLimit The value for logRateLimit (can be {@code null})
* @return {@code this} builder for use in a chained invocation
*/
@JsonProperty("log_rate_limit")
public final Builder logRateLimit(@Nullable Integer logRateLimit) {
this.logRateLimit = logRateLimit;
return this;
}
/**
* Builds a new {@link SummaryApplicationResponse SummaryApplicationResponse}.
* @return An immutable instance of SummaryApplicationResponse
* @throws java.lang.IllegalStateException if any required attributes are missing
*/
public SummaryApplicationResponse build() {
return new SummaryApplicationResponse(this);
}
}
private static List createSafeList(Iterable extends T> iterable, boolean checkNulls, boolean skipNulls) {
ArrayList list;
if (iterable instanceof Collection>) {
int size = ((Collection>) iterable).size();
if (size == 0) return Collections.emptyList();
list = new ArrayList<>(size);
} else {
list = new ArrayList<>();
}
for (T element : iterable) {
if (skipNulls && element == null) continue;
if (checkNulls) Objects.requireNonNull(element, "element");
list.add(element);
}
return list;
}
private static List createUnmodifiableList(boolean clone, List list) {
switch(list.size()) {
case 0: return Collections.emptyList();
case 1: return Collections.singletonList(list.get(0));
default:
if (clone) {
return Collections.unmodifiableList(new ArrayList<>(list));
} else {
if (list instanceof ArrayList>) {
((ArrayList>) list).trimToSize();
}
return Collections.unmodifiableList(list);
}
}
}
private static Map createUnmodifiableMap(boolean checkNulls, boolean skipNulls, Map extends K, ? extends V> map) {
switch (map.size()) {
case 0: return Collections.emptyMap();
case 1: {
Map.Entry extends K, ? extends V> e = map.entrySet().iterator().next();
K k = e.getKey();
V v = e.getValue();
if (checkNulls) {
Objects.requireNonNull(k, "key");
Objects.requireNonNull(v, v == null ? "value for key: " + k : null);
}
if (skipNulls && (k == null || v == null)) {
return Collections.emptyMap();
}
return Collections.singletonMap(k, v);
}
default: {
Map linkedMap = new LinkedHashMap<>(map.size() * 4 / 3 + 1);
if (skipNulls || checkNulls) {
for (Map.Entry extends K, ? extends V> e : map.entrySet()) {
K k = e.getKey();
V v = e.getValue();
if (skipNulls) {
if (k == null || v == null) continue;
} else if (checkNulls) {
Objects.requireNonNull(k, "key");
Objects.requireNonNull(v, v == null ? "value for key: " + k : null);
}
linkedMap.put(k, v);
}
} else {
linkedMap.putAll(map);
}
return Collections.unmodifiableMap(linkedMap);
}
}
}
}