com.pulumi.digitalocean.outputs.GetFirewallResult Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean Show documentation
Show all versions of digitalocean Show documentation
A Pulumi package for creating and managing DigitalOcean cloud resources.
// *** 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.digitalocean.outputs;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.digitalocean.outputs.GetFirewallInboundRule;
import com.pulumi.digitalocean.outputs.GetFirewallOutboundRule;
import com.pulumi.digitalocean.outputs.GetFirewallPendingChange;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
@CustomType
public final class GetFirewallResult {
/**
* @return A time value given in ISO8601 combined date and time format
* that represents when the Firewall was created.
*
*/
private String createdAt;
/**
* @return The list of the IDs of the Droplets assigned to
* the Firewall.
*
*/
private List dropletIds;
private String firewallId;
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
private String id;
private List inboundRules;
/**
* @return The name of the Firewall.
*
*/
private String name;
private List outboundRules;
/**
* @return A set of object containing the fields, `droplet_id`,
* `removing`, and `status`. It is provided to detail exactly which Droplets
* are having their security policies updated. When empty, all changes
* have been successfully applied.
*
*/
private List pendingChanges;
/**
* @return A status string indicating the current state of the Firewall.
* This can be "waiting", "succeeded", or "failed".
*
*/
private String status;
/**
* @return The names of the Tags assigned to the Firewall.
*
*/
private List tags;
private GetFirewallResult() {}
/**
* @return A time value given in ISO8601 combined date and time format
* that represents when the Firewall was created.
*
*/
public String createdAt() {
return this.createdAt;
}
/**
* @return The list of the IDs of the Droplets assigned to
* the Firewall.
*
*/
public List dropletIds() {
return this.dropletIds;
}
public String firewallId() {
return this.firewallId;
}
/**
* @return The provider-assigned unique ID for this managed resource.
*
*/
public String id() {
return this.id;
}
public List inboundRules() {
return this.inboundRules;
}
/**
* @return The name of the Firewall.
*
*/
public String name() {
return this.name;
}
public List outboundRules() {
return this.outboundRules;
}
/**
* @return A set of object containing the fields, `droplet_id`,
* `removing`, and `status`. It is provided to detail exactly which Droplets
* are having their security policies updated. When empty, all changes
* have been successfully applied.
*
*/
public List pendingChanges() {
return this.pendingChanges;
}
/**
* @return A status string indicating the current state of the Firewall.
* This can be "waiting", "succeeded", or "failed".
*
*/
public String status() {
return this.status;
}
/**
* @return The names of the Tags assigned to the Firewall.
*
*/
public List tags() {
return this.tags;
}
public static Builder builder() {
return new Builder();
}
public static Builder builder(GetFirewallResult defaults) {
return new Builder(defaults);
}
@CustomType.Builder
public static final class Builder {
private String createdAt;
private List dropletIds;
private String firewallId;
private String id;
private List inboundRules;
private String name;
private List outboundRules;
private List pendingChanges;
private String status;
private List tags;
public Builder() {}
public Builder(GetFirewallResult defaults) {
Objects.requireNonNull(defaults);
this.createdAt = defaults.createdAt;
this.dropletIds = defaults.dropletIds;
this.firewallId = defaults.firewallId;
this.id = defaults.id;
this.inboundRules = defaults.inboundRules;
this.name = defaults.name;
this.outboundRules = defaults.outboundRules;
this.pendingChanges = defaults.pendingChanges;
this.status = defaults.status;
this.tags = defaults.tags;
}
@CustomType.Setter
public Builder createdAt(String createdAt) {
if (createdAt == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "createdAt");
}
this.createdAt = createdAt;
return this;
}
@CustomType.Setter
public Builder dropletIds(List dropletIds) {
if (dropletIds == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "dropletIds");
}
this.dropletIds = dropletIds;
return this;
}
public Builder dropletIds(Integer... dropletIds) {
return dropletIds(List.of(dropletIds));
}
@CustomType.Setter
public Builder firewallId(String firewallId) {
if (firewallId == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "firewallId");
}
this.firewallId = firewallId;
return this;
}
@CustomType.Setter
public Builder id(String id) {
if (id == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "id");
}
this.id = id;
return this;
}
@CustomType.Setter
public Builder inboundRules(List inboundRules) {
if (inboundRules == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "inboundRules");
}
this.inboundRules = inboundRules;
return this;
}
public Builder inboundRules(GetFirewallInboundRule... inboundRules) {
return inboundRules(List.of(inboundRules));
}
@CustomType.Setter
public Builder name(String name) {
if (name == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "name");
}
this.name = name;
return this;
}
@CustomType.Setter
public Builder outboundRules(List outboundRules) {
if (outboundRules == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "outboundRules");
}
this.outboundRules = outboundRules;
return this;
}
public Builder outboundRules(GetFirewallOutboundRule... outboundRules) {
return outboundRules(List.of(outboundRules));
}
@CustomType.Setter
public Builder pendingChanges(List pendingChanges) {
if (pendingChanges == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "pendingChanges");
}
this.pendingChanges = pendingChanges;
return this;
}
public Builder pendingChanges(GetFirewallPendingChange... pendingChanges) {
return pendingChanges(List.of(pendingChanges));
}
@CustomType.Setter
public Builder status(String status) {
if (status == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "status");
}
this.status = status;
return this;
}
@CustomType.Setter
public Builder tags(List tags) {
if (tags == null) {
throw new MissingRequiredPropertyException("GetFirewallResult", "tags");
}
this.tags = tags;
return this;
}
public Builder tags(String... tags) {
return tags(List.of(tags));
}
public GetFirewallResult build() {
final var _resultValue = new GetFirewallResult();
_resultValue.createdAt = createdAt;
_resultValue.dropletIds = dropletIds;
_resultValue.firewallId = firewallId;
_resultValue.id = id;
_resultValue.inboundRules = inboundRules;
_resultValue.name = name;
_resultValue.outboundRules = outboundRules;
_resultValue.pendingChanges = pendingChanges;
_resultValue.status = status;
_resultValue.tags = tags;
return _resultValue;
}
}
}