com.spotify.docker.client.messages.mount.AutoValue_VolumeOptions Maven / Gradle / Ivy
package com.spotify.docker.client.messages.mount;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import java.util.Map;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_VolumeOptions extends VolumeOptions {
private final Boolean noCopy;
private final ImmutableMap labels;
private final Driver driverConfig;
private AutoValue_VolumeOptions(
Boolean noCopy,
ImmutableMap labels,
Driver driverConfig) {
this.noCopy = noCopy;
this.labels = labels;
this.driverConfig = driverConfig;
}
@JsonProperty(value = "NoCopy")
@Override
public Boolean noCopy() {
return noCopy;
}
@JsonProperty(value = "Labels")
@Override
public ImmutableMap labels() {
return labels;
}
@JsonProperty(value = "DriverConfig")
@Override
public Driver driverConfig() {
return driverConfig;
}
@Override
public String toString() {
return "VolumeOptions{"
+ "noCopy=" + noCopy + ", "
+ "labels=" + labels + ", "
+ "driverConfig=" + driverConfig
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof VolumeOptions) {
VolumeOptions that = (VolumeOptions) o;
return (this.noCopy.equals(that.noCopy()))
&& (this.labels.equals(that.labels()))
&& (this.driverConfig.equals(that.driverConfig()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.noCopy.hashCode();
h *= 1000003;
h ^= this.labels.hashCode();
h *= 1000003;
h ^= this.driverConfig.hashCode();
return h;
}
static final class Builder extends VolumeOptions.Builder {
private Boolean noCopy;
private ImmutableMap.Builder labelsBuilder$;
private ImmutableMap labels;
private Driver driverConfig;
Builder() {
this.labels = ImmutableMap.of();
}
Builder(VolumeOptions source) {
this.noCopy = source.noCopy();
this.labels = source.labels();
this.driverConfig = source.driverConfig();
}
@Override
public VolumeOptions.Builder noCopy(Boolean noCopy) {
this.noCopy = noCopy;
return this;
}
@Override
public VolumeOptions.Builder labels(Map labels) {
if (labelsBuilder$ != null) {
throw new IllegalStateException("Cannot set labels after calling labelsBuilder()");
}
this.labels = ImmutableMap.copyOf(labels);
return this;
}
@Override
public ImmutableMap.Builder labelsBuilder() {
if (labelsBuilder$ == null) {
labelsBuilder$ = ImmutableMap.builder();
labelsBuilder$.putAll(labels);
labels = null;
}
return labelsBuilder$;
}
@Override
public VolumeOptions.Builder driverConfig(Driver driverConfig) {
this.driverConfig = driverConfig;
return this;
}
@Override
public VolumeOptions build() {
if (labelsBuilder$ != null) {
labels = labelsBuilder$.build();
}
String missing = "";
if (noCopy == null) {
missing += " noCopy";
}
if (driverConfig == null) {
missing += " driverConfig";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_VolumeOptions(
this.noCopy,
this.labels,
this.driverConfig);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy