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.
36+ * `allowed_source_ranges` and `ip_block_list_name` may be set together. When
37+ * both are set, `allowed_source_ranges` is evaluated first, then
38+ * `ip_block_list_name` is evaluated.
39+ */
3540@ javax .annotation .Generated (value = "JavaGenerator" , comments = "Generator version: 7.19.0" )
3641public class LoadbalancerOptionAccessControl {
3742 public static final String SERIALIZED_NAME_ALLOWED_SOURCE_RANGES = "allowedSourceRanges" ;
3843
3944 @ SerializedName (SERIALIZED_NAME_ALLOWED_SOURCE_RANGES )
4045 @ javax .annotation .Nullable private List <String > allowedSourceRanges = new ArrayList <>();
4146
47+ public static final String SERIALIZED_NAME_IP_BLOCK_LIST_NAME = "ipBlockListName" ;
48+
49+ @ SerializedName (SERIALIZED_NAME_IP_BLOCK_LIST_NAME )
50+ @ javax .annotation .Nullable private String ipBlockListName ;
51+
4252 public LoadbalancerOptionAccessControl () {}
4353
4454 public LoadbalancerOptionAccessControl allowedSourceRanges (
@@ -57,7 +67,9 @@ public LoadbalancerOptionAccessControl addAllowedSourceRangesItem(
5767 }
5868
5969 /**
60- * Application Load Balancer is accessible only from an IP address in this range
70+ * Application Load Balancer is accessible only from an IP address in this range. May be
71+ * combined with `ipBlockListName`; `allowedSourceRanges` is evaluated
72+ * first, then `ipBlockListName`.
6173 *
6274 * @return allowedSourceRanges
6375 */
@@ -70,6 +82,28 @@ public void setAllowedSourceRanges(
7082 this .allowedSourceRanges = allowedSourceRanges ;
7183 }
7284
85+ public LoadbalancerOptionAccessControl ipBlockListName (
86+ @ javax .annotation .Nullable String ipBlockListName ) {
87+ this .ipBlockListName = ipBlockListName ;
88+ return this ;
89+ }
90+
91+ /**
92+ * Reference to an IP block list by name. Traffic originating from any IP in the referenced list
93+ * is denied access to the Application Load Balancer. See \"IP Lists API\" for how to
94+ * manage IP block lists. May be combined with `allowedSourceRanges`;
95+ * `allowedSourceRanges` is evaluated first, then `ipBlockListName`.
96+ *
97+ * @return ipBlockListName
98+ */
99+ @ javax .annotation .Nullable public String getIpBlockListName () {
100+ return ipBlockListName ;
101+ }
102+
103+ public void setIpBlockListName (@ javax .annotation .Nullable String ipBlockListName ) {
104+ this .ipBlockListName = ipBlockListName ;
105+ }
106+
73107 /**
74108 * A container for additional, undeclared properties. This is a holder for any undeclared
75109 * properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -127,14 +161,16 @@ public boolean equals(Object o) {
127161 return Objects .equals (
128162 this .allowedSourceRanges ,
129163 loadbalancerOptionAccessControl .allowedSourceRanges )
164+ && Objects .equals (
165+ this .ipBlockListName , loadbalancerOptionAccessControl .ipBlockListName )
130166 && Objects .equals (
131167 this .additionalProperties ,
132168 loadbalancerOptionAccessControl .additionalProperties );
133169 }
134170
135171 @ Override
136172 public int hashCode () {
137- return Objects .hash (allowedSourceRanges , additionalProperties );
173+ return Objects .hash (allowedSourceRanges , ipBlockListName , additionalProperties );
138174 }
139175
140176 @ Override
@@ -144,6 +180,7 @@ public String toString() {
144180 sb .append (" allowedSourceRanges: " )
145181 .append (toIndentedString (allowedSourceRanges ))
146182 .append ("\n " );
183+ sb .append (" ipBlockListName: " ).append (toIndentedString (ipBlockListName )).append ("\n " );
147184 sb .append (" additionalProperties: " )
148185 .append (toIndentedString (additionalProperties ))
149186 .append ("\n " );
@@ -167,7 +204,8 @@ private String toIndentedString(Object o) {
167204
168205 static {
169206 // a set of all properties/fields (JSON key names)
170- openapiFields = new HashSet <String >(Arrays .asList ("allowedSourceRanges" ));
207+ openapiFields =
208+ new HashSet <String >(Arrays .asList ("allowedSourceRanges" , "ipBlockListName" ));
171209
172210 // a set of required properties/fields (JSON key names)
173211 openapiRequiredFields = new HashSet <String >(0 );
@@ -202,6 +240,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
202240 "Expected the field `allowedSourceRanges` to be an array in the JSON string but got `%s`" ,
203241 jsonObj .get ("allowedSourceRanges" ).toString ()));
204242 }
243+ if ((jsonObj .get ("ipBlockListName" ) != null && !jsonObj .get ("ipBlockListName" ).isJsonNull ())
244+ && !jsonObj .get ("ipBlockListName" ).isJsonPrimitive ()) {
245+ throw new IllegalArgumentException (
246+ String .format (
247+ java .util .Locale .ROOT ,
248+ "Expected the field `ipBlockListName` to be a primitive type in the JSON string but got `%s`" ,
249+ jsonObj .get ("ipBlockListName" ).toString ()));
250+ }
205251 }
206252
207253 public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
0 commit comments