3131import java.util.Map;
3232import java.util.Objects;
3333
34- /** Use this option to limit the IP ranges that can use the Application Load Balancer. */
34+ /**
35+ * Use this option to limit the IP ranges that can use the Application Load Balancer. Only one of
36+ * `allowed_source_ranges` or `ip_block_list_name` may be set at the same time.
37+ */
3538@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0")
3639public class LoadbalancerOptionAccessControl {
3740 public static final String SERIALIZED_NAME_ALLOWED_SOURCE_RANGES = "allowedSourceRanges";
3841
3942 @SerializedName(SERIALIZED_NAME_ALLOWED_SOURCE_RANGES)
4043 @javax.annotation.Nullable private List<String> allowedSourceRanges = new ArrayList<>();
4144
45+ public static final String SERIALIZED_NAME_IP_BLOCK_LIST_NAME = "ipBlockListName";
46+
47+ @SerializedName(SERIALIZED_NAME_IP_BLOCK_LIST_NAME)
48+ @javax.annotation.Nullable private String ipBlockListName;
49+
4250 public LoadbalancerOptionAccessControl() {}
4351
4452 public LoadbalancerOptionAccessControl allowedSourceRanges(
@@ -57,7 +65,8 @@ public LoadbalancerOptionAccessControl addAllowedSourceRangesItem(
5765 }
5866
5967 /**
60- * Application Load Balancer is accessible only from an IP address in this range
68+ * Application Load Balancer is accessible only from an IP address in this range. Mutually
69+ * exclusive with `ipBlockListName`.
6170 *
6271 * @return allowedSourceRanges
6372 */
@@ -70,6 +79,27 @@ public void setAllowedSourceRanges(
7079 this.allowedSourceRanges = allowedSourceRanges;
7180 }
7281
82+ public LoadbalancerOptionAccessControl ipBlockListName(
83+ @javax.annotation.Nullable String ipBlockListName) {
84+ this.ipBlockListName = ipBlockListName;
85+ return this;
86+ }
87+
88+ /**
89+ * Reference to an IP block list by name. Traffic originating from any IP in the referenced list
90+ * is denied access to the Application Load Balancer. See \"IP Lists API\" for how to
91+ * manage IP block lists. Mutually exclusive with `allowedSourceRanges`.
92+ *
93+ * @return ipBlockListName
94+ */
95+ @javax.annotation.Nullable public String getIpBlockListName() {
96+ return ipBlockListName;
97+ }
98+
99+ public void setIpBlockListName(@javax.annotation.Nullable String ipBlockListName) {
100+ this.ipBlockListName = ipBlockListName;
101+ }
102+
73103 /**
74104 * A container for additional, undeclared properties. This is a holder for any undeclared
75105 * properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -127,14 +157,16 @@ public boolean equals(Object o) {
127157 return Objects.equals(
128158 this.allowedSourceRanges,
129159 loadbalancerOptionAccessControl.allowedSourceRanges)
160+ && Objects.equals(
161+ this.ipBlockListName, loadbalancerOptionAccessControl.ipBlockListName)
130162 && Objects.equals(
131163 this.additionalProperties,
132164 loadbalancerOptionAccessControl.additionalProperties);
133165 }
134166
135167 @Override
136168 public int hashCode() {
137- return Objects.hash(allowedSourceRanges, additionalProperties);
169+ return Objects.hash(allowedSourceRanges, ipBlockListName, additionalProperties);
138170 }
139171
140172 @Override
@@ -144,6 +176,7 @@ public String toString() {
144176 sb.append(" allowedSourceRanges: ")
145177 .append(toIndentedString(allowedSourceRanges))
146178 .append("\n");
179+ sb.append(" ipBlockListName: ").append(toIndentedString(ipBlockListName)).append("\n");
147180 sb.append(" additionalProperties: ")
148181 .append(toIndentedString(additionalProperties))
149182 .append("\n");
@@ -167,7 +200,8 @@ private String toIndentedString(Object o) {
167200
168201 static {
169202 // a set of all properties/fields (JSON key names)
170- openapiFields = new HashSet<String>(Arrays.asList("allowedSourceRanges"));
203+ openapiFields =
204+ new HashSet<String>(Arrays.asList("allowedSourceRanges", "ipBlockListName"));
171205
172206 // a set of required properties/fields (JSON key names)
173207 openapiRequiredFields = new HashSet<String>(0);
@@ -202,6 +236,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
202236 "Expected the field `allowedSourceRanges` to be an array in the JSON string but got `%s`",
203237 jsonObj.get("allowedSourceRanges").toString()));
204238 }
239+ if ((jsonObj.get("ipBlockListName") != null && !jsonObj.get("ipBlockListName").isJsonNull())
240+ && !jsonObj.get("ipBlockListName").isJsonPrimitive()) {
241+ throw new IllegalArgumentException(
242+ String.format(
243+ java.util.Locale.ROOT,
244+ "Expected the field `ipBlockListName` to be a primitive type in the JSON string but got `%s`",
245+ jsonObj.get("ipBlockListName").toString()));
246+ }
205247 }
206248
207249 public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
0 commit comments