com.pulumi.docker.outputs.GetNetworkResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of docker Show documentation
Show all versions of docker Show documentation
A Pulumi package for interacting with Docker in Pulumi programs
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package com.pulumi.docker.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.docker.outputs.GetNetworkIpamConfig;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@CustomType
public final class GetNetworkResult {
/**
* @return The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.
*
*/
private String driver;
/**
* @return The ID of this resource.
*
*/
private String id;
/**
* @return If `true`, the network is internal.
*
*/
private Boolean internal;
/**
* @return The IPAM configuration options
*
*/
private List ipamConfigs;
/**
* @return The name of the Docker network.
*
*/
private String name;
/**
* @return Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
*
*/
private Map options;
/**
* @return Scope of the network. One of `swarm`, `global`, or `local`.
*
*/
private String scope;
private GetNetworkResult() {}
/**
* @return The driver of the Docker network. Possible values are `bridge`, `host`, `overlay`, `macvlan`. See [network docs](https://docs.docker.com/network/#network-drivers) for more details.
*
*/
public String driver() {
return this.driver;
}
/**
* @return The ID of this resource.
*
*/
public String id() {
return this.id;
}
/**
* @return If `true`, the network is internal.
*
*/
public Boolean internal() {
return this.internal;
}
/**
* @return The IPAM configuration options
*
*/
public List ipamConfigs() {
return this.ipamConfigs;
}
/**
* @return The name of the Docker network.
*
*/
public String name() {
return this.name;
}
/**
* @return Only available with bridge networks. See [bridge options docs](https://docs.docker.com/engine/reference/commandline/network_create/#bridge-driver-options) for more details.
*
*/
public Map options() {
return this.options;
}
/**
* @return Scope of the network. One of `swarm`, `global`, or `local`.
*
*/
public String scope() {
return this.scope;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetNetworkResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String driver;
private String id;
private Boolean internal;
private List ipamConfigs;
private String name;
private Map options;
private String scope;
public Builder() {}
public Builder(GetNetworkResult defaults) {
Objects.requireNonNull(defaults);
this.driver = defaults.driver;
this.id = defaults.id;
this.internal = defaults.internal;
this.ipamConfigs = defaults.ipamConfigs;
this.name = defaults.name;
this.options = defaults.options;
this.scope = defaults.scope;
}
@CustomType.Setter
public Builder driver(String driver) {
if (driver == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "driver");
}
this.driver = driver;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder internal(Boolean internal) {
if (internal == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "internal");
}
this.internal = internal;
return this;
}
@CustomType.Setter
public Builder ipamConfigs(List ipamConfigs) {
if (ipamConfigs == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "ipamConfigs");
}
this.ipamConfigs = ipamConfigs;
return this;
}
public Builder ipamConfigs(GetNetworkIpamConfig... ipamConfigs) {
return ipamConfigs(List.of(ipamConfigs));
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder options(Map options) {
if (options == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "options");
}
this.options = options;
return this;
}
@CustomType.Setter
public Builder scope(String scope) {
if (scope == null) {
throw new MissingRequiredPropertyException("GetNetworkResult", "scope");
}
this.scope = scope;
return this;
}
public GetNetworkResult build() {
final var _resultValue = new GetNetworkResult();
_resultValue.driver = driver;
_resultValue.id = id;
_resultValue.internal = internal;
_resultValue.ipamConfigs = ipamConfigs;
_resultValue.name = name;
_resultValue.options = options;
_resultValue.scope = scope;
return _resultValue;
}
}
}