com.databricks.sdk.service.settings.ReplaceIpAccessList Maven / Gradle / Ivy
// Code generated from OpenAPI specs by Databricks SDK Generator. DO NOT EDIT.
package com.databricks.sdk.service.settings;
import com.databricks.sdk.support.Generated;
import com.databricks.sdk.support.ToStringer;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import java.util.Objects;
/** Details required to replace an IP access list. */
@Generated
public class ReplaceIpAccessList {
/** Specifies whether this IP access list is enabled. */
@JsonProperty("enabled")
private Boolean enabled;
/** The ID for the corresponding IP access list */
@JsonIgnore private String ipAccessListId;
/** */
@JsonProperty("ip_addresses")
private Collection ipAddresses;
/** Label for the IP access list. This **cannot** be empty. */
@JsonProperty("label")
private String label;
/**
* Type of IP access list. Valid values are as follows and are case-sensitive:
*
* * `ALLOW`: An allow list. Include this IP or range. * `BLOCK`: A block list. Exclude this IP
* or range. IP addresses in the block list are excluded even if they are included in an allow
* list.
*/
@JsonProperty("list_type")
private ListType listType;
public ReplaceIpAccessList setEnabled(Boolean enabled) {
this.enabled = enabled;
return this;
}
public Boolean getEnabled() {
return enabled;
}
public ReplaceIpAccessList setIpAccessListId(String ipAccessListId) {
this.ipAccessListId = ipAccessListId;
return this;
}
public String getIpAccessListId() {
return ipAccessListId;
}
public ReplaceIpAccessList setIpAddresses(Collection ipAddresses) {
this.ipAddresses = ipAddresses;
return this;
}
public Collection getIpAddresses() {
return ipAddresses;
}
public ReplaceIpAccessList setLabel(String label) {
this.label = label;
return this;
}
public String getLabel() {
return label;
}
public ReplaceIpAccessList setListType(ListType listType) {
this.listType = listType;
return this;
}
public ListType getListType() {
return listType;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ReplaceIpAccessList that = (ReplaceIpAccessList) o;
return Objects.equals(enabled, that.enabled)
&& Objects.equals(ipAccessListId, that.ipAccessListId)
&& Objects.equals(ipAddresses, that.ipAddresses)
&& Objects.equals(label, that.label)
&& Objects.equals(listType, that.listType);
}
@Override
public int hashCode() {
return Objects.hash(enabled, ipAccessListId, ipAddresses, label, listType);
}
@Override
public String toString() {
return new ToStringer(ReplaceIpAccessList.class)
.add("enabled", enabled)
.add("ipAccessListId", ipAccessListId)
.add("ipAddresses", ipAddresses)
.add("label", label)
.add("listType", listType)
.toString();
}
}