50
50
51
51
/**
52
52
* With the Context Based Restrictions API, you can:
53
- * * Create, list, get, update , and delete network zones
54
- * * Create, list, get, update , and delete context-based restriction rules
53
+ * * Create, list, get, replace , and delete network zones
54
+ * * Create, list, get, replace , and delete context-based restriction rules
55
55
* * Get account settings
56
56
* .
57
57
*
@@ -100,7 +100,7 @@ public ContextBasedRestrictions(String serviceName, Authenticator authenticator)
100
100
}
101
101
102
102
/**
103
- * Create a zone.
103
+ * Create a network zone.
104
104
*
105
105
* This operation creates a network zone for the specified account.
106
106
*
@@ -119,6 +119,9 @@ public ServiceCall<Zone> createZone(CreateZoneOptions createZoneOptions) {
119
119
builder .header (header .getKey (), header .getValue ());
120
120
}
121
121
builder .header ("Accept" , "application/json" );
122
+ if (createZoneOptions .xCorrelationId () != null ) {
123
+ builder .header ("X-Correlation-Id" , createZoneOptions .xCorrelationId ());
124
+ }
122
125
if (createZoneOptions .transactionId () != null ) {
123
126
builder .header ("Transaction-Id" , createZoneOptions .transactionId ());
124
127
}
@@ -147,7 +150,7 @@ public ServiceCall<Zone> createZone(CreateZoneOptions createZoneOptions) {
147
150
}
148
151
149
152
/**
150
- * Create a zone.
153
+ * Create a network zone.
151
154
*
152
155
* This operation creates a network zone for the specified account.
153
156
*
@@ -174,6 +177,9 @@ public ServiceCall<ZoneList> listZones(ListZonesOptions listZonesOptions) {
174
177
builder .header (header .getKey (), header .getValue ());
175
178
}
176
179
builder .header ("Accept" , "application/json" );
180
+ if (listZonesOptions .xCorrelationId () != null ) {
181
+ builder .header ("X-Correlation-Id" , listZonesOptions .xCorrelationId ());
182
+ }
177
183
if (listZonesOptions .transactionId () != null ) {
178
184
builder .header ("Transaction-Id" , listZonesOptions .transactionId ());
179
185
}
@@ -190,9 +196,9 @@ public ServiceCall<ZoneList> listZones(ListZonesOptions listZonesOptions) {
190
196
}
191
197
192
198
/**
193
- * Get the specified network zone.
199
+ * Get a network zone.
194
200
*
195
- * This operation returns the network zone for the specified ID.
201
+ * This operation retrieves the network zone identified by the specified zone ID.
196
202
*
197
203
* @param getZoneOptions the {@link GetZoneOptions} containing the options for the call
198
204
* @return a {@link ServiceCall} with a result of type {@link Zone}
@@ -208,6 +214,9 @@ public ServiceCall<Zone> getZone(GetZoneOptions getZoneOptions) {
208
214
builder .header (header .getKey (), header .getValue ());
209
215
}
210
216
builder .header ("Accept" , "application/json" );
217
+ if (getZoneOptions .xCorrelationId () != null ) {
218
+ builder .header ("X-Correlation-Id" , getZoneOptions .xCorrelationId ());
219
+ }
211
220
if (getZoneOptions .transactionId () != null ) {
212
221
builder .header ("Transaction-Id" , getZoneOptions .transactionId ());
213
222
}
@@ -217,9 +226,10 @@ public ServiceCall<Zone> getZone(GetZoneOptions getZoneOptions) {
217
226
}
218
227
219
228
/**
220
- * Update the specified network zone.
229
+ * Replace a network zone.
221
230
*
222
- * This operation updates the network zone with the specified ID.
231
+ * This operation replaces the network zone identified by the specified zone ID. Partial updates are not supported.
232
+ * The entire network zone object must be replaced.
223
233
*
224
234
* @param replaceZoneOptions the {@link ReplaceZoneOptions} containing the options for the call
225
235
* @return a {@link ServiceCall} with a result of type {@link Zone}
@@ -236,6 +246,9 @@ public ServiceCall<Zone> replaceZone(ReplaceZoneOptions replaceZoneOptions) {
236
246
}
237
247
builder .header ("Accept" , "application/json" );
238
248
builder .header ("If-Match" , replaceZoneOptions .ifMatch ());
249
+ if (replaceZoneOptions .xCorrelationId () != null ) {
250
+ builder .header ("X-Correlation-Id" , replaceZoneOptions .xCorrelationId ());
251
+ }
239
252
if (replaceZoneOptions .transactionId () != null ) {
240
253
builder .header ("Transaction-Id" , replaceZoneOptions .transactionId ());
241
254
}
@@ -262,9 +275,9 @@ public ServiceCall<Zone> replaceZone(ReplaceZoneOptions replaceZoneOptions) {
262
275
}
263
276
264
277
/**
265
- * Delete the specified network zone.
278
+ * Delete a network zone.
266
279
*
267
- * This operation deletes the network zone with the specified home ID.
280
+ * This operation deletes the network zone identified by the specified zone ID.
268
281
*
269
282
* @param deleteZoneOptions the {@link DeleteZoneOptions} containing the options for the call
270
283
* @return a {@link ServiceCall} with a void result
@@ -279,6 +292,9 @@ public ServiceCall<Void> deleteZone(DeleteZoneOptions deleteZoneOptions) {
279
292
for (Entry <String , String > header : sdkHeaders .entrySet ()) {
280
293
builder .header (header .getKey (), header .getValue ());
281
294
}
295
+ if (deleteZoneOptions .xCorrelationId () != null ) {
296
+ builder .header ("X-Correlation-Id" , deleteZoneOptions .xCorrelationId ());
297
+ }
282
298
if (deleteZoneOptions .transactionId () != null ) {
283
299
builder .header ("Transaction-Id" , deleteZoneOptions .transactionId ());
284
300
}
@@ -304,6 +320,12 @@ public ServiceCall<ServiceRefTargetList> listAvailableServicerefTargets(ListAvai
304
320
builder .header (header .getKey (), header .getValue ());
305
321
}
306
322
builder .header ("Accept" , "application/json" );
323
+ if (listAvailableServicerefTargetsOptions .xCorrelationId () != null ) {
324
+ builder .header ("X-Correlation-Id" , listAvailableServicerefTargetsOptions .xCorrelationId ());
325
+ }
326
+ if (listAvailableServicerefTargetsOptions .transactionId () != null ) {
327
+ builder .header ("Transaction-Id" , listAvailableServicerefTargetsOptions .transactionId ());
328
+ }
307
329
if (listAvailableServicerefTargetsOptions .type () != null ) {
308
330
builder .query ("type" , String .valueOf (listAvailableServicerefTargetsOptions .type ()));
309
331
}
@@ -343,6 +365,9 @@ public ServiceCall<Rule> createRule(CreateRuleOptions createRuleOptions) {
343
365
builder .header (header .getKey (), header .getValue ());
344
366
}
345
367
builder .header ("Accept" , "application/json" );
368
+ if (createRuleOptions .xCorrelationId () != null ) {
369
+ builder .header ("X-Correlation-Id" , createRuleOptions .xCorrelationId ());
370
+ }
346
371
if (createRuleOptions .transactionId () != null ) {
347
372
builder .header ("Transaction-Id" , createRuleOptions .transactionId ());
348
373
}
@@ -378,7 +403,7 @@ public ServiceCall<Rule> createRule() {
378
403
/**
379
404
* List rules.
380
405
*
381
- * This operation lists rules for the specified account.
406
+ * This operation lists rules in the specified account.
382
407
*
383
408
* @param listRulesOptions the {@link ListRulesOptions} containing the options for the call
384
409
* @return a {@link ServiceCall} with a result of type {@link RuleList}
@@ -392,6 +417,9 @@ public ServiceCall<RuleList> listRules(ListRulesOptions listRulesOptions) {
392
417
builder .header (header .getKey (), header .getValue ());
393
418
}
394
419
builder .header ("Accept" , "application/json" );
420
+ if (listRulesOptions .xCorrelationId () != null ) {
421
+ builder .header ("X-Correlation-Id" , listRulesOptions .xCorrelationId ());
422
+ }
395
423
if (listRulesOptions .transactionId () != null ) {
396
424
builder .header ("Transaction-Id" , listRulesOptions .transactionId ());
397
425
}
@@ -426,9 +454,9 @@ public ServiceCall<RuleList> listRules(ListRulesOptions listRulesOptions) {
426
454
}
427
455
428
456
/**
429
- * Get the specified rule.
457
+ * Get a rule.
430
458
*
431
- * This operation gets the rule for the specified ID.
459
+ * This operation retrieves the rule identified by the specified rule ID.
432
460
*
433
461
* @param getRuleOptions the {@link GetRuleOptions} containing the options for the call
434
462
* @return a {@link ServiceCall} with a result of type {@link Rule}
@@ -444,6 +472,9 @@ public ServiceCall<Rule> getRule(GetRuleOptions getRuleOptions) {
444
472
builder .header (header .getKey (), header .getValue ());
445
473
}
446
474
builder .header ("Accept" , "application/json" );
475
+ if (getRuleOptions .xCorrelationId () != null ) {
476
+ builder .header ("X-Correlation-Id" , getRuleOptions .xCorrelationId ());
477
+ }
447
478
if (getRuleOptions .transactionId () != null ) {
448
479
builder .header ("Transaction-Id" , getRuleOptions .transactionId ());
449
480
}
@@ -453,9 +484,10 @@ public ServiceCall<Rule> getRule(GetRuleOptions getRuleOptions) {
453
484
}
454
485
455
486
/**
456
- * Update the specified rule.
487
+ * Replace a rule.
457
488
*
458
- * This operation updates the rule for the specified ID.
489
+ * This operation replaces the rule identified by the specified rule ID. Partial updates are not supported. The entire
490
+ * rule object must be replaced.
459
491
*
460
492
* @param replaceRuleOptions the {@link ReplaceRuleOptions} containing the options for the call
461
493
* @return a {@link ServiceCall} with a result of type {@link Rule}
@@ -472,6 +504,9 @@ public ServiceCall<Rule> replaceRule(ReplaceRuleOptions replaceRuleOptions) {
472
504
}
473
505
builder .header ("Accept" , "application/json" );
474
506
builder .header ("If-Match" , replaceRuleOptions .ifMatch ());
507
+ if (replaceRuleOptions .xCorrelationId () != null ) {
508
+ builder .header ("X-Correlation-Id" , replaceRuleOptions .xCorrelationId ());
509
+ }
475
510
if (replaceRuleOptions .transactionId () != null ) {
476
511
builder .header ("Transaction-Id" , replaceRuleOptions .transactionId ());
477
512
}
@@ -492,9 +527,9 @@ public ServiceCall<Rule> replaceRule(ReplaceRuleOptions replaceRuleOptions) {
492
527
}
493
528
494
529
/**
495
- * Delete the specified rule.
530
+ * Delete a rule.
496
531
*
497
- * This operation deletes the rule for the specified home ID.
532
+ * This operation deletes the rule identified by the specified rule ID.
498
533
*
499
534
* @param deleteRuleOptions the {@link DeleteRuleOptions} containing the options for the call
500
535
* @return a {@link ServiceCall} with a void result
@@ -509,6 +544,9 @@ public ServiceCall<Void> deleteRule(DeleteRuleOptions deleteRuleOptions) {
509
544
for (Entry <String , String > header : sdkHeaders .entrySet ()) {
510
545
builder .header (header .getKey (), header .getValue ());
511
546
}
547
+ if (deleteRuleOptions .xCorrelationId () != null ) {
548
+ builder .header ("X-Correlation-Id" , deleteRuleOptions .xCorrelationId ());
549
+ }
512
550
if (deleteRuleOptions .transactionId () != null ) {
513
551
builder .header ("Transaction-Id" , deleteRuleOptions .transactionId ());
514
552
}
@@ -517,9 +555,9 @@ public ServiceCall<Void> deleteRule(DeleteRuleOptions deleteRuleOptions) {
517
555
}
518
556
519
557
/**
520
- * Get the specified account settings.
558
+ * Get account settings.
521
559
*
522
- * This operation gets the settings for the specified account ID.
560
+ * This operation retrieves the settings for the specified account ID.
523
561
*
524
562
* @param getAccountSettingsOptions the {@link GetAccountSettingsOptions} containing the options for the call
525
563
* @return a {@link ServiceCall} with a result of type {@link AccountSettings}
@@ -535,6 +573,9 @@ public ServiceCall<AccountSettings> getAccountSettings(GetAccountSettingsOptions
535
573
builder .header (header .getKey (), header .getValue ());
536
574
}
537
575
builder .header ("Accept" , "application/json" );
576
+ if (getAccountSettingsOptions .xCorrelationId () != null ) {
577
+ builder .header ("X-Correlation-Id" , getAccountSettingsOptions .xCorrelationId ());
578
+ }
538
579
if (getAccountSettingsOptions .transactionId () != null ) {
539
580
builder .header ("Transaction-Id" , getAccountSettingsOptions .transactionId ());
540
581
}
0 commit comments