001package Torello.Browser.BrowserAPI; 002 003import java.util.*; 004import javax.json.*; 005import javax.json.stream.*; 006import java.io.*; 007 008import java.lang.reflect.Method; 009import java.lang.reflect.Parameter; 010import java.util.function.Function; 011 012import Torello.Browser.BrowserEvent; 013import Torello.Browser.JavaScriptAPI.*; 014import Torello.Browser.helper.*; 015 016import Torello.Java.Additional.*; 017import Torello.Java.JSON.*; 018 019import static Torello.Java.JSON.JFlag.*; 020 021import Torello.Java.StrCmpr; 022import Torello.JavaDoc.StaticFunctional; 023import Torello.JavaDoc.JDHeaderBackgroundImg; 024import Torello.JavaDoc.Excuse; 025 026/** 027 * <SPAN CLASS=COPIEDJDK><B><CODE>[No Description Provided by Google]</CODE></B></SPAN> 028 * 029 * <EMBED CLASS='external-html' DATA-FILE-ID=CODE_GEN_NOTE> 030 */ 031@StaticFunctional(Excused={"counter"}, Excuses={Excuse.CONFIGURATION}) 032@JDHeaderBackgroundImg(EmbedTagFileID="WOOD_PLANK_NOTE") 033public class Storage 034{ 035 // ******************************************************************************************** 036 // ******************************************************************************************** 037 // Class Header Stuff 038 // ******************************************************************************************** 039 // ******************************************************************************************** 040 041 042 // No Pubic Constructors 043 private Storage () { } 044 045 // These two Vector's are used by all the "Methods" exported by this class. java.lang.reflect 046 // is used to generate the JSON String's. It saves thousands of lines of Auto-Generated Code. 047 private static final Map<String, Vector<String>> parameterNames = new HashMap<>(); 048 private static final Map<String, Vector<Class<?>>> parameterTypes = new HashMap<>(); 049 050 // Some Methods do not take any parameters - for instance all the "enable()" and "disable()" 051 // I simply could not get ride of RAW-TYPES and UNCHECKED warnings... so there are now, 052 // offically, two empty-vectors. One for String's, and the other for Classes. 053 054 private static final Vector<String> EMPTY_VEC_STR = new Vector<>(); 055 private static final Vector<Class<?>> EMPTY_VEC_CLASS = new Vector<>(); 056 057 static 058 { 059 for (Method m : Storage.class.getMethods()) 060 { 061 // This doesn't work! The parameter names are all "arg0" ... "argN" 062 // It works for java.lang.reflect.Field, BUT NOT java.lang.reflect.Parameter! 063 // 064 // Vector<String> parameterNamesList = new Vector<>(); -- NOPE! 065 066 Vector<Class<?>> parameterTypesList = new Vector<>(); 067 068 for (Parameter p : m.getParameters()) parameterTypesList.add(p.getType()); 069 070 parameterTypes.put( 071 m.getName(), 072 (parameterTypesList.size() > 0) ? parameterTypesList : EMPTY_VEC_CLASS 073 ); 074 } 075 } 076 077 static 078 { 079 Vector<String> v = null; 080 081 v = new Vector<String>(1); 082 parameterNames.put("getStorageKeyForFrame", v); 083 Collections.addAll(v, new String[] 084 { "frameId", }); 085 086 v = new Vector<String>(2); 087 parameterNames.put("clearDataForOrigin", v); 088 Collections.addAll(v, new String[] 089 { "origin", "storageTypes", }); 090 091 v = new Vector<String>(2); 092 parameterNames.put("clearDataForStorageKey", v); 093 Collections.addAll(v, new String[] 094 { "storageKey", "storageTypes", }); 095 096 v = new Vector<String>(1); 097 parameterNames.put("getCookies", v); 098 Collections.addAll(v, new String[] 099 { "browserContextId", }); 100 101 v = new Vector<String>(2); 102 parameterNames.put("setCookies", v); 103 Collections.addAll(v, new String[] 104 { "cookies", "browserContextId", }); 105 106 v = new Vector<String>(1); 107 parameterNames.put("clearCookies", v); 108 Collections.addAll(v, new String[] 109 { "browserContextId", }); 110 111 v = new Vector<String>(1); 112 parameterNames.put("getUsageAndQuota", v); 113 Collections.addAll(v, new String[] 114 { "origin", }); 115 116 v = new Vector<String>(2); 117 parameterNames.put("overrideQuotaForOrigin", v); 118 Collections.addAll(v, new String[] 119 { "origin", "quotaSize", }); 120 121 v = new Vector<String>(1); 122 parameterNames.put("trackCacheStorageForOrigin", v); 123 Collections.addAll(v, new String[] 124 { "origin", }); 125 126 v = new Vector<String>(1); 127 parameterNames.put("trackCacheStorageForStorageKey", v); 128 Collections.addAll(v, new String[] 129 { "storageKey", }); 130 131 v = new Vector<String>(1); 132 parameterNames.put("trackIndexedDBForOrigin", v); 133 Collections.addAll(v, new String[] 134 { "origin", }); 135 136 v = new Vector<String>(1); 137 parameterNames.put("trackIndexedDBForStorageKey", v); 138 Collections.addAll(v, new String[] 139 { "storageKey", }); 140 141 v = new Vector<String>(1); 142 parameterNames.put("untrackCacheStorageForOrigin", v); 143 Collections.addAll(v, new String[] 144 { "origin", }); 145 146 v = new Vector<String>(1); 147 parameterNames.put("untrackCacheStorageForStorageKey", v); 148 Collections.addAll(v, new String[] 149 { "storageKey", }); 150 151 v = new Vector<String>(1); 152 parameterNames.put("untrackIndexedDBForOrigin", v); 153 Collections.addAll(v, new String[] 154 { "origin", }); 155 156 v = new Vector<String>(1); 157 parameterNames.put("untrackIndexedDBForStorageKey", v); 158 Collections.addAll(v, new String[] 159 { "storageKey", }); 160 161 parameterNames.put("getTrustTokens", EMPTY_VEC_STR); 162 163 v = new Vector<String>(1); 164 parameterNames.put("clearTrustTokens", v); 165 Collections.addAll(v, new String[] 166 { "issuerOrigin", }); 167 168 v = new Vector<String>(2); 169 parameterNames.put("getInterestGroupDetails", v); 170 Collections.addAll(v, new String[] 171 { "ownerOrigin", "name", }); 172 173 v = new Vector<String>(1); 174 parameterNames.put("setInterestGroupTracking", v); 175 Collections.addAll(v, new String[] 176 { "enable", }); 177 178 v = new Vector<String>(1); 179 parameterNames.put("setInterestGroupAuctionTracking", v); 180 Collections.addAll(v, new String[] 181 { "enable", }); 182 183 v = new Vector<String>(1); 184 parameterNames.put("getSharedStorageMetadata", v); 185 Collections.addAll(v, new String[] 186 { "ownerOrigin", }); 187 188 v = new Vector<String>(1); 189 parameterNames.put("getSharedStorageEntries", v); 190 Collections.addAll(v, new String[] 191 { "ownerOrigin", }); 192 193 v = new Vector<String>(4); 194 parameterNames.put("setSharedStorageEntry", v); 195 Collections.addAll(v, new String[] 196 { "ownerOrigin", "key", "value", "ignoreIfPresent", }); 197 198 v = new Vector<String>(2); 199 parameterNames.put("deleteSharedStorageEntry", v); 200 Collections.addAll(v, new String[] 201 { "ownerOrigin", "key", }); 202 203 v = new Vector<String>(1); 204 parameterNames.put("clearSharedStorageEntries", v); 205 Collections.addAll(v, new String[] 206 { "ownerOrigin", }); 207 208 v = new Vector<String>(1); 209 parameterNames.put("resetSharedStorageBudget", v); 210 Collections.addAll(v, new String[] 211 { "ownerOrigin", }); 212 213 v = new Vector<String>(1); 214 parameterNames.put("setSharedStorageTracking", v); 215 Collections.addAll(v, new String[] 216 { "enable", }); 217 218 v = new Vector<String>(2); 219 parameterNames.put("setStorageBucketTracking", v); 220 Collections.addAll(v, new String[] 221 { "storageKey", "enable", }); 222 223 v = new Vector<String>(1); 224 parameterNames.put("deleteStorageBucket", v); 225 Collections.addAll(v, new String[] 226 { "bucket", }); 227 228 parameterNames.put("runBounceTrackingMitigations", EMPTY_VEC_STR); 229 230 v = new Vector<String>(1); 231 parameterNames.put("setAttributionReportingLocalTestingMode", v); 232 Collections.addAll(v, new String[] 233 { "enabled", }); 234 235 v = new Vector<String>(1); 236 parameterNames.put("setAttributionReportingTracking", v); 237 Collections.addAll(v, new String[] 238 { "enable", }); 239 240 parameterNames.put("sendPendingAttributionReports", EMPTY_VEC_STR); 241 242 parameterNames.put("getRelatedWebsiteSets", EMPTY_VEC_STR); 243 244 v = new Vector<String>(2); 245 parameterNames.put("getAffectedUrlsForThirdPartyCookieMetadata", v); 246 Collections.addAll(v, new String[] 247 { "firstPartyUrl", "thirdPartyUrls", }); 248 249 v = new Vector<String>(3); 250 parameterNames.put("setProtectedAudienceKAnonymity", v); 251 Collections.addAll(v, new String[] 252 { "owner", "name", "hashes", }); 253 } 254 255 256 // ******************************************************************************************** 257 // ******************************************************************************************** 258 // Types - Static Inner Classes 259 // ******************************************************************************************** 260 // ******************************************************************************************** 261 262 // public static class SerializedStorageKey => String 263 264 // public static class InterestGroupAuctionId => String 265 266 // public static class UnsignedInt64AsBase10 => String 267 268 // public static class UnsignedInt128AsBase16 => String 269 270 // public static class SignedInt64AsBase10 => String 271 272 /** Enum of possible storage types. */ 273 public static final String[] StorageType = 274 { 275 "cookies", "file_systems", "indexeddb", "local_storage", "shader_cache", "websql", 276 "service_workers", "cache_storage", "interest_groups", "shared_storage", "storage_buckets", 277 "all", "other", 278 }; 279 280 /** Enum of interest group access types. */ 281 public static final String[] InterestGroupAccessType = 282 { 283 "join", "leave", "update", "loaded", "bid", "win", "additionalBid", "additionalBidWin", 284 "topLevelBid", "topLevelAdditionalBid", "clear", 285 }; 286 287 /** Enum of auction events. */ 288 public static final String[] InterestGroupAuctionEventType = 289 { "started", "configResolved", }; 290 291 /** Enum of network fetches auctions can do. */ 292 public static final String[] InterestGroupAuctionFetchType = 293 { "bidderJs", "bidderWasm", "sellerJs", "bidderTrustedSignals", "sellerTrustedSignals", }; 294 295 /** Enum of shared storage access scopes. */ 296 public static final String[] SharedStorageAccessScope = 297 { "window", "sharedStorageWorklet", "protectedAudienceWorklet", "header", }; 298 299 /** Enum of shared storage access methods. */ 300 public static final String[] SharedStorageAccessMethod = 301 { 302 "addModule", "createWorklet", "selectURL", "run", "batchUpdate", "set", "append", "delete", 303 "clear", "get", "keys", "values", "entries", "length", "remainingBudget", 304 }; 305 306 /** <CODE>[No Description Provided by Google]</CODE> */ 307 public static final String[] StorageBucketsDurability = 308 { "relaxed", "strict", }; 309 310 /** 311 * <CODE>[No Description Provided by Google]</CODE> 312 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 313 */ 314 public static final String[] AttributionReportingSourceType = 315 { "navigation", "event", }; 316 317 /** 318 * <CODE>[No Description Provided by Google]</CODE> 319 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 320 */ 321 public static final String[] AttributionReportingTriggerDataMatching = 322 { "exact", "modulus", }; 323 324 /** 325 * <CODE>[No Description Provided by Google]</CODE> 326 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 327 */ 328 public static final String[] AttributionReportingSourceRegistrationResult = 329 { 330 "success", "internalError", "insufficientSourceCapacity", 331 "insufficientUniqueDestinationCapacity", "excessiveReportingOrigins", 332 "prohibitedByBrowserPolicy", "successNoised", "destinationReportingLimitReached", 333 "destinationGlobalLimitReached", "destinationBothLimitsReached", 334 "reportingOriginsPerSiteLimitReached", "exceedsMaxChannelCapacity", 335 "exceedsMaxScopesChannelCapacity", "exceedsMaxTriggerStateCardinality", 336 "exceedsMaxEventStatesLimit", "destinationPerDayReportingLimitReached", 337 }; 338 339 /** 340 * <CODE>[No Description Provided by Google]</CODE> 341 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 342 */ 343 public static final String[] AttributionReportingSourceRegistrationTimeConfig = 344 { "include", "exclude", }; 345 346 /** 347 * <CODE>[No Description Provided by Google]</CODE> 348 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 349 */ 350 public static final String[] AttributionReportingEventLevelResult = 351 { 352 "success", "successDroppedLowerPriority", "internalError", 353 "noCapacityForAttributionDestination", "noMatchingSources", "deduplicated", 354 "excessiveAttributions", "priorityTooLow", "neverAttributedSource", 355 "excessiveReportingOrigins", "noMatchingSourceFilterData", "prohibitedByBrowserPolicy", 356 "noMatchingConfigurations", "excessiveReports", "falselyAttributedSource", 357 "reportWindowPassed", "notRegistered", "reportWindowNotStarted", "noMatchingTriggerData", 358 }; 359 360 /** 361 * <CODE>[No Description Provided by Google]</CODE> 362 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 363 */ 364 public static final String[] AttributionReportingAggregatableResult = 365 { 366 "success", "internalError", "noCapacityForAttributionDestination", "noMatchingSources", 367 "excessiveAttributions", "excessiveReportingOrigins", "noHistograms", "insufficientBudget", 368 "insufficientNamedBudget", "noMatchingSourceFilterData", "notRegistered", 369 "prohibitedByBrowserPolicy", "deduplicated", "reportWindowPassed", "excessiveReports", 370 }; 371 372 /** 373 * <CODE>[No Description Provided by Google]</CODE> 374 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 375 */ 376 public static final String[] AttributionReportingReportResult = 377 { "sent", "prohibited", "failedToAssemble", "expired", }; 378 379 /** Usage for a storage type. */ 380 public static class UsageForType 381 extends BaseType 382 implements java.io.Serializable 383 { 384 /** For Object Serialization. java.io.Serializable */ 385 protected static final long serialVersionUID = 1; 386 387 public boolean[] optionals() 388 { return new boolean[] { false, false, }; } 389 390 /** Name of storage type. */ 391 public final String storageType; 392 393 /** Storage usage (bytes). */ 394 public final Number usage; 395 396 /** 397 * Constructor 398 * 399 * @param storageType Name of storage type. 400 * 401 * @param usage Storage usage (bytes). 402 */ 403 public UsageForType(String storageType, Number usage) 404 { 405 // Exception-Check(s) to ensure that if any parameters which are not declared as 406 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 407 408 if (storageType == null) THROWS.throwNPE("storageType"); 409 if (usage == null) THROWS.throwNPE("usage"); 410 411 // Exception-Check(s) to ensure that if any parameters which must adhere to a 412 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 413 414 THROWS.checkIAE("storageType", storageType, "Storage.StorageType", Storage.StorageType); 415 416 this.storageType = storageType; 417 this.usage = usage; 418 } 419 420 /** 421 * JSON Object Constructor 422 * @param jo A Json-Object having data about an instance of {@code 'UsageForType'}. 423 */ 424 public UsageForType (JsonObject jo) 425 { 426 this.storageType = ReadJSON.getString(jo, "storageType", false, true); 427 this.usage = ReadNumberJSON.get(jo, "usage", false, true); 428 } 429 430 431 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 432 public boolean equals(Object other) 433 { 434 if (this == other) return true; 435 if (other == null) return false; 436 if (other.getClass() != this.getClass()) return false; 437 438 UsageForType o = (UsageForType) other; 439 440 return 441 Objects.equals(this.storageType, o.storageType) 442 && Objects.equals(this.usage, o.usage); 443 } 444 445 /** Generates a Hash-Code for {@code 'this'} instance */ 446 public int hashCode() 447 { 448 return 449 Objects.hashCode(this.storageType) 450 + Objects.hashCode(this.usage); 451 } 452 } 453 454 /** 455 * Pair of issuer origin and number of available (signed, but not used) Trust 456 * Tokens from that issuer. 457 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 458 */ 459 public static class TrustTokens 460 extends BaseType 461 implements java.io.Serializable 462 { 463 /** For Object Serialization. java.io.Serializable */ 464 protected static final long serialVersionUID = 1; 465 466 public boolean[] optionals() 467 { return new boolean[] { false, false, }; } 468 469 /** <CODE>[No Description Provided by Google]</CODE> */ 470 public final String issuerOrigin; 471 472 /** <CODE>[No Description Provided by Google]</CODE> */ 473 public final Number count; 474 475 /** 476 * Constructor 477 * 478 * @param issuerOrigin - 479 * 480 * @param count - 481 */ 482 public TrustTokens(String issuerOrigin, Number count) 483 { 484 // Exception-Check(s) to ensure that if any parameters which are not declared as 485 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 486 487 if (issuerOrigin == null) THROWS.throwNPE("issuerOrigin"); 488 if (count == null) THROWS.throwNPE("count"); 489 490 this.issuerOrigin = issuerOrigin; 491 this.count = count; 492 } 493 494 /** 495 * JSON Object Constructor 496 * @param jo A Json-Object having data about an instance of {@code 'TrustTokens'}. 497 */ 498 public TrustTokens (JsonObject jo) 499 { 500 this.issuerOrigin = ReadJSON.getString(jo, "issuerOrigin", false, true); 501 this.count = ReadNumberJSON.get(jo, "count", false, true); 502 } 503 504 505 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 506 public boolean equals(Object other) 507 { 508 if (this == other) return true; 509 if (other == null) return false; 510 if (other.getClass() != this.getClass()) return false; 511 512 TrustTokens o = (TrustTokens) other; 513 514 return 515 Objects.equals(this.issuerOrigin, o.issuerOrigin) 516 && Objects.equals(this.count, o.count); 517 } 518 519 /** Generates a Hash-Code for {@code 'this'} instance */ 520 public int hashCode() 521 { 522 return 523 Objects.hashCode(this.issuerOrigin) 524 + Objects.hashCode(this.count); 525 } 526 } 527 528 /** Struct for a single key-value pair in an origin's shared storage. */ 529 public static class SharedStorageEntry 530 extends BaseType 531 implements java.io.Serializable 532 { 533 /** For Object Serialization. java.io.Serializable */ 534 protected static final long serialVersionUID = 1; 535 536 public boolean[] optionals() 537 { return new boolean[] { false, false, }; } 538 539 /** <CODE>[No Description Provided by Google]</CODE> */ 540 public final String key; 541 542 /** <CODE>[No Description Provided by Google]</CODE> */ 543 public final String value; 544 545 /** 546 * Constructor 547 * 548 * @param key - 549 * 550 * @param value - 551 */ 552 public SharedStorageEntry(String key, String value) 553 { 554 // Exception-Check(s) to ensure that if any parameters which are not declared as 555 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 556 557 if (key == null) THROWS.throwNPE("key"); 558 if (value == null) THROWS.throwNPE("value"); 559 560 this.key = key; 561 this.value = value; 562 } 563 564 /** 565 * JSON Object Constructor 566 * @param jo A Json-Object having data about an instance of {@code 'SharedStorageEntry'}. 567 */ 568 public SharedStorageEntry (JsonObject jo) 569 { 570 this.key = ReadJSON.getString(jo, "key", false, true); 571 this.value = ReadJSON.getString(jo, "value", false, true); 572 } 573 574 575 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 576 public boolean equals(Object other) 577 { 578 if (this == other) return true; 579 if (other == null) return false; 580 if (other.getClass() != this.getClass()) return false; 581 582 SharedStorageEntry o = (SharedStorageEntry) other; 583 584 return 585 Objects.equals(this.key, o.key) 586 && Objects.equals(this.value, o.value); 587 } 588 589 /** Generates a Hash-Code for {@code 'this'} instance */ 590 public int hashCode() 591 { 592 return 593 Objects.hashCode(this.key) 594 + Objects.hashCode(this.value); 595 } 596 } 597 598 /** Details for an origin's shared storage. */ 599 public static class SharedStorageMetadata 600 extends BaseType 601 implements java.io.Serializable 602 { 603 /** For Object Serialization. java.io.Serializable */ 604 protected static final long serialVersionUID = 1; 605 606 public boolean[] optionals() 607 { return new boolean[] { false, false, false, false, }; } 608 609 /** Time when the origin's shared storage was last created. */ 610 public final Number creationTime; 611 612 /** Number of key-value pairs stored in origin's shared storage. */ 613 public final int length; 614 615 /** Current amount of bits of entropy remaining in the navigation budget. */ 616 public final Number remainingBudget; 617 618 /** 619 * Total number of bytes stored as key-value pairs in origin's shared 620 * storage. 621 */ 622 public final int bytesUsed; 623 624 /** 625 * Constructor 626 * 627 * @param creationTime Time when the origin's shared storage was last created. 628 * 629 * @param length Number of key-value pairs stored in origin's shared storage. 630 * 631 * @param remainingBudget Current amount of bits of entropy remaining in the navigation budget. 632 * 633 * @param bytesUsed 634 * Total number of bytes stored as key-value pairs in origin's shared 635 * storage. 636 */ 637 public SharedStorageMetadata 638 (Number creationTime, int length, Number remainingBudget, int bytesUsed) 639 { 640 // Exception-Check(s) to ensure that if any parameters which are not declared as 641 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 642 643 if (creationTime == null) THROWS.throwNPE("creationTime"); 644 if (remainingBudget == null) THROWS.throwNPE("remainingBudget"); 645 646 this.creationTime = creationTime; 647 this.length = length; 648 this.remainingBudget = remainingBudget; 649 this.bytesUsed = bytesUsed; 650 } 651 652 /** 653 * JSON Object Constructor 654 * @param jo A Json-Object having data about an instance of {@code 'SharedStorageMetadata'}. 655 */ 656 public SharedStorageMetadata (JsonObject jo) 657 { 658 this.creationTime = ReadNumberJSON.get(jo, "creationTime", false, true); 659 this.length = ReadPrimJSON.getInt(jo, "length"); 660 this.remainingBudget = ReadNumberJSON.get(jo, "remainingBudget", false, true); 661 this.bytesUsed = ReadPrimJSON.getInt(jo, "bytesUsed"); 662 } 663 664 665 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 666 public boolean equals(Object other) 667 { 668 if (this == other) return true; 669 if (other == null) return false; 670 if (other.getClass() != this.getClass()) return false; 671 672 SharedStorageMetadata o = (SharedStorageMetadata) other; 673 674 return 675 Objects.equals(this.creationTime, o.creationTime) 676 && (this.length == o.length) 677 && Objects.equals(this.remainingBudget, o.remainingBudget) 678 && (this.bytesUsed == o.bytesUsed); 679 } 680 681 /** Generates a Hash-Code for {@code 'this'} instance */ 682 public int hashCode() 683 { 684 return 685 Objects.hashCode(this.creationTime) 686 + this.length 687 + Objects.hashCode(this.remainingBudget) 688 + this.bytesUsed; 689 } 690 } 691 692 /** 693 * Represents a dictionary object passed in as privateAggregationConfig to 694 * run or selectURL. 695 */ 696 public static class SharedStoragePrivateAggregationConfig 697 extends BaseType 698 implements java.io.Serializable 699 { 700 /** For Object Serialization. java.io.Serializable */ 701 protected static final long serialVersionUID = 1; 702 703 public boolean[] optionals() 704 { return new boolean[] { true, true, false, true, }; } 705 706 /** 707 * The chosen aggregation service deployment. 708 * <BR /><B CLASS=Opt>OPTIONAL</B> 709 */ 710 public final String aggregationCoordinatorOrigin; 711 712 /** 713 * The context ID provided. 714 * <BR /><B CLASS=Opt>OPTIONAL</B> 715 */ 716 public final String contextId; 717 718 /** Configures the maximum size allowed for filtering IDs. */ 719 public final int filteringIdMaxBytes; 720 721 /** 722 * The limit on the number of contributions in the final report. 723 * <BR /><B CLASS=Opt>OPTIONAL</B> 724 */ 725 public final Integer maxContributions; 726 727 /** 728 * Constructor 729 * 730 * @param aggregationCoordinatorOrigin The chosen aggregation service deployment. 731 * <BR /><B CLASS=Opt>OPTIONAL</B> 732 * 733 * @param contextId The context ID provided. 734 * <BR /><B CLASS=Opt>OPTIONAL</B> 735 * 736 * @param filteringIdMaxBytes Configures the maximum size allowed for filtering IDs. 737 * 738 * @param maxContributions The limit on the number of contributions in the final report. 739 * <BR /><B CLASS=Opt>OPTIONAL</B> 740 */ 741 public SharedStoragePrivateAggregationConfig( 742 String aggregationCoordinatorOrigin, String contextId, int filteringIdMaxBytes, 743 Integer maxContributions 744 ) 745 { 746 this.aggregationCoordinatorOrigin = aggregationCoordinatorOrigin; 747 this.contextId = contextId; 748 this.filteringIdMaxBytes = filteringIdMaxBytes; 749 this.maxContributions = maxContributions; 750 } 751 752 /** 753 * JSON Object Constructor 754 * @param jo A Json-Object having data about an instance of {@code 'SharedStoragePrivateAggregationConfig'}. 755 */ 756 public SharedStoragePrivateAggregationConfig (JsonObject jo) 757 { 758 this.aggregationCoordinatorOrigin = ReadJSON.getString(jo, "aggregationCoordinatorOrigin", true, false); 759 this.contextId = ReadJSON.getString(jo, "contextId", true, false); 760 this.filteringIdMaxBytes = ReadPrimJSON.getInt(jo, "filteringIdMaxBytes"); 761 this.maxContributions = ReadBoxedJSON.getInteger(jo, "maxContributions", true); 762 } 763 764 765 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 766 public boolean equals(Object other) 767 { 768 if (this == other) return true; 769 if (other == null) return false; 770 if (other.getClass() != this.getClass()) return false; 771 772 SharedStoragePrivateAggregationConfig o = (SharedStoragePrivateAggregationConfig) other; 773 774 return 775 Objects.equals(this.aggregationCoordinatorOrigin, o.aggregationCoordinatorOrigin) 776 && Objects.equals(this.contextId, o.contextId) 777 && (this.filteringIdMaxBytes == o.filteringIdMaxBytes) 778 && Objects.equals(this.maxContributions, o.maxContributions); 779 } 780 781 /** Generates a Hash-Code for {@code 'this'} instance */ 782 public int hashCode() 783 { 784 return 785 Objects.hashCode(this.aggregationCoordinatorOrigin) 786 + Objects.hashCode(this.contextId) 787 + this.filteringIdMaxBytes 788 + Objects.hashCode(this.maxContributions); 789 } 790 } 791 792 /** Pair of reporting metadata details for a candidate URL for {@code selectURL()}. */ 793 public static class SharedStorageReportingMetadata 794 extends BaseType 795 implements java.io.Serializable 796 { 797 /** For Object Serialization. java.io.Serializable */ 798 protected static final long serialVersionUID = 1; 799 800 public boolean[] optionals() 801 { return new boolean[] { false, false, }; } 802 803 /** <CODE>[No Description Provided by Google]</CODE> */ 804 public final String eventType; 805 806 /** <CODE>[No Description Provided by Google]</CODE> */ 807 public final String reportingUrl; 808 809 /** 810 * Constructor 811 * 812 * @param eventType - 813 * 814 * @param reportingUrl - 815 */ 816 public SharedStorageReportingMetadata(String eventType, String reportingUrl) 817 { 818 // Exception-Check(s) to ensure that if any parameters which are not declared as 819 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 820 821 if (eventType == null) THROWS.throwNPE("eventType"); 822 if (reportingUrl == null) THROWS.throwNPE("reportingUrl"); 823 824 this.eventType = eventType; 825 this.reportingUrl = reportingUrl; 826 } 827 828 /** 829 * JSON Object Constructor 830 * @param jo A Json-Object having data about an instance of {@code 'SharedStorageReportingMetadata'}. 831 */ 832 public SharedStorageReportingMetadata (JsonObject jo) 833 { 834 this.eventType = ReadJSON.getString(jo, "eventType", false, true); 835 this.reportingUrl = ReadJSON.getString(jo, "reportingUrl", false, true); 836 } 837 838 839 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 840 public boolean equals(Object other) 841 { 842 if (this == other) return true; 843 if (other == null) return false; 844 if (other.getClass() != this.getClass()) return false; 845 846 SharedStorageReportingMetadata o = (SharedStorageReportingMetadata) other; 847 848 return 849 Objects.equals(this.eventType, o.eventType) 850 && Objects.equals(this.reportingUrl, o.reportingUrl); 851 } 852 853 /** Generates a Hash-Code for {@code 'this'} instance */ 854 public int hashCode() 855 { 856 return 857 Objects.hashCode(this.eventType) 858 + Objects.hashCode(this.reportingUrl); 859 } 860 } 861 862 /** Bundles a candidate URL with its reporting metadata. */ 863 public static class SharedStorageUrlWithMetadata 864 extends BaseType 865 implements java.io.Serializable 866 { 867 /** For Object Serialization. java.io.Serializable */ 868 protected static final long serialVersionUID = 1; 869 870 public boolean[] optionals() 871 { return new boolean[] { false, false, }; } 872 873 /** Spec of candidate URL. */ 874 public final String url; 875 876 /** Any associated reporting metadata. */ 877 public final Storage.SharedStorageReportingMetadata[] reportingMetadata; 878 879 /** 880 * Constructor 881 * 882 * @param url Spec of candidate URL. 883 * 884 * @param reportingMetadata Any associated reporting metadata. 885 */ 886 public SharedStorageUrlWithMetadata 887 (String url, Storage.SharedStorageReportingMetadata[] reportingMetadata) 888 { 889 // Exception-Check(s) to ensure that if any parameters which are not declared as 890 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 891 892 if (url == null) THROWS.throwNPE("url"); 893 if (reportingMetadata == null) THROWS.throwNPE("reportingMetadata"); 894 895 this.url = url; 896 this.reportingMetadata = reportingMetadata; 897 } 898 899 /** 900 * JSON Object Constructor 901 * @param jo A Json-Object having data about an instance of {@code 'SharedStorageUrlWithMetadata'}. 902 */ 903 public SharedStorageUrlWithMetadata (JsonObject jo) 904 { 905 this.url = ReadJSON.getString(jo, "url", false, true); 906 this.reportingMetadata = (jo.getJsonArray("reportingMetadata") == null) 907 ? null 908 : RJArrIntoStream.objArr(jo.getJsonArray("reportingMetadata"), null, 0, Storage.SharedStorageReportingMetadata.class).toArray(Storage.SharedStorageReportingMetadata[]::new); 909 910 } 911 912 913 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 914 public boolean equals(Object other) 915 { 916 if (this == other) return true; 917 if (other == null) return false; 918 if (other.getClass() != this.getClass()) return false; 919 920 SharedStorageUrlWithMetadata o = (SharedStorageUrlWithMetadata) other; 921 922 return 923 Objects.equals(this.url, o.url) 924 && Arrays.deepEquals(this.reportingMetadata, o.reportingMetadata); 925 } 926 927 /** Generates a Hash-Code for {@code 'this'} instance */ 928 public int hashCode() 929 { 930 return 931 Objects.hashCode(this.url) 932 + Arrays.deepHashCode(this.reportingMetadata); 933 } 934 } 935 936 /** 937 * Bundles the parameters for shared storage access events whose 938 * presence/absence can vary according to SharedStorageAccessType. 939 */ 940 public static class SharedStorageAccessParams 941 extends BaseType 942 implements java.io.Serializable 943 { 944 /** For Object Serialization. java.io.Serializable */ 945 protected static final long serialVersionUID = 1; 946 947 public boolean[] optionals() 948 { return new boolean[] { true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, }; } 949 950 /** 951 * Spec of the module script URL. 952 * Present only for SharedStorageAccessMethods: addModule and 953 * createWorklet. 954 * <BR /><B CLASS=Opt>OPTIONAL</B> 955 */ 956 public final String scriptSourceUrl; 957 958 /** 959 * String denoting "context-origin", "script-origin", or a custom 960 * origin to be used as the worklet's data origin. 961 * Present only for SharedStorageAccessMethod: createWorklet. 962 * <BR /><B CLASS=Opt>OPTIONAL</B> 963 */ 964 public final String dataOrigin; 965 966 /** 967 * Name of the registered operation to be run. 968 * Present only for SharedStorageAccessMethods: run and selectURL. 969 * <BR /><B CLASS=Opt>OPTIONAL</B> 970 */ 971 public final String operationName; 972 973 /** 974 * ID of the operation call. 975 * Present only for SharedStorageAccessMethods: run and selectURL. 976 * <BR /><B CLASS=Opt>OPTIONAL</B> 977 */ 978 public final String operationId; 979 980 /** 981 * Whether or not to keep the worket alive for future run or selectURL 982 * calls. 983 * Present only for SharedStorageAccessMethods: run and selectURL. 984 * <BR /><B CLASS=Opt>OPTIONAL</B> 985 */ 986 public final Boolean keepAlive; 987 988 /** 989 * Configures the private aggregation options. 990 * Present only for SharedStorageAccessMethods: run and selectURL. 991 * <BR /><B CLASS=Opt>OPTIONAL</B> 992 */ 993 public final Storage.SharedStoragePrivateAggregationConfig privateAggregationConfig; 994 995 /** 996 * The operation's serialized data in bytes (converted to a string). 997 * Present only for SharedStorageAccessMethods: run and selectURL. 998 * TODO(crbug.com/401011862): Consider updating this parameter to binary. 999 * <BR /><B CLASS=Opt>OPTIONAL</B> 1000 */ 1001 public final String serializedData; 1002 1003 /** 1004 * Array of candidate URLs' specs, along with any associated metadata. 1005 * Present only for SharedStorageAccessMethod: selectURL. 1006 * <BR /><B CLASS=Opt>OPTIONAL</B> 1007 */ 1008 public final Storage.SharedStorageUrlWithMetadata[] urlsWithMetadata; 1009 1010 /** 1011 * Spec of the URN:UUID generated for a selectURL call. 1012 * Present only for SharedStorageAccessMethod: selectURL. 1013 * <BR /><B CLASS=Opt>OPTIONAL</B> 1014 */ 1015 public final String urnUuid; 1016 1017 /** 1018 * Key for a specific entry in an origin's shared storage. 1019 * Present only for SharedStorageAccessMethods: set, append, delete, and 1020 * get. 1021 * <BR /><B CLASS=Opt>OPTIONAL</B> 1022 */ 1023 public final String key; 1024 1025 /** 1026 * Value for a specific entry in an origin's shared storage. 1027 * Present only for SharedStorageAccessMethods: set and append. 1028 * <BR /><B CLASS=Opt>OPTIONAL</B> 1029 */ 1030 public final String value; 1031 1032 /** 1033 * Whether or not to set an entry for a key if that key is already present. 1034 * Present only for SharedStorageAccessMethod: set. 1035 * <BR /><B CLASS=Opt>OPTIONAL</B> 1036 */ 1037 public final Boolean ignoreIfPresent; 1038 1039 /** 1040 * A number denoting the (0-based) order of the worklet's 1041 * creation relative to all other shared storage worklets created by 1042 * documents using the current storage partition. 1043 * Present only for SharedStorageAccessMethods: addModule, createWorklet. 1044 * <BR /><B CLASS=Opt>OPTIONAL</B> 1045 */ 1046 public final Integer workletOrdinal; 1047 1048 /** 1049 * Hex representation of the DevTools token used as the TargetID for the 1050 * associated shared storage worklet. 1051 * Present only for SharedStorageAccessMethods: addModule, createWorklet, 1052 * run, selectURL, and any other SharedStorageAccessMethod when the 1053 * SharedStorageAccessScope is sharedStorageWorklet. 1054 * <BR /><B CLASS=Opt>OPTIONAL</B> 1055 */ 1056 public final String workletTargetId; 1057 1058 /** 1059 * Name of the lock to be acquired, if present. 1060 * Optionally present only for SharedStorageAccessMethods: batchUpdate, 1061 * set, append, delete, and clear. 1062 * <BR /><B CLASS=Opt>OPTIONAL</B> 1063 */ 1064 public final String withLock; 1065 1066 /** 1067 * If the method has been called as part of a batchUpdate, then this 1068 * number identifies the batch to which it belongs. 1069 * Optionally present only for SharedStorageAccessMethods: 1070 * batchUpdate (required), set, append, delete, and clear. 1071 * <BR /><B CLASS=Opt>OPTIONAL</B> 1072 */ 1073 public final String batchUpdateId; 1074 1075 /** 1076 * Number of modifier methods sent in batch. 1077 * Present only for SharedStorageAccessMethod: batchUpdate. 1078 * <BR /><B CLASS=Opt>OPTIONAL</B> 1079 */ 1080 public final Integer batchSize; 1081 1082 /** 1083 * Constructor 1084 * 1085 * @param scriptSourceUrl 1086 * Spec of the module script URL. 1087 * Present only for SharedStorageAccessMethods: addModule and 1088 * createWorklet. 1089 * <BR /><B CLASS=Opt>OPTIONAL</B> 1090 * 1091 * @param dataOrigin 1092 * String denoting "context-origin", "script-origin", or a custom 1093 * origin to be used as the worklet's data origin. 1094 * Present only for SharedStorageAccessMethod: createWorklet. 1095 * <BR /><B CLASS=Opt>OPTIONAL</B> 1096 * 1097 * @param operationName 1098 * Name of the registered operation to be run. 1099 * Present only for SharedStorageAccessMethods: run and selectURL. 1100 * <BR /><B CLASS=Opt>OPTIONAL</B> 1101 * 1102 * @param operationId 1103 * ID of the operation call. 1104 * Present only for SharedStorageAccessMethods: run and selectURL. 1105 * <BR /><B CLASS=Opt>OPTIONAL</B> 1106 * 1107 * @param keepAlive 1108 * Whether or not to keep the worket alive for future run or selectURL 1109 * calls. 1110 * Present only for SharedStorageAccessMethods: run and selectURL. 1111 * <BR /><B CLASS=Opt>OPTIONAL</B> 1112 * 1113 * @param privateAggregationConfig 1114 * Configures the private aggregation options. 1115 * Present only for SharedStorageAccessMethods: run and selectURL. 1116 * <BR /><B CLASS=Opt>OPTIONAL</B> 1117 * 1118 * @param serializedData 1119 * The operation's serialized data in bytes (converted to a string). 1120 * Present only for SharedStorageAccessMethods: run and selectURL. 1121 * TODO(crbug.com/401011862): Consider updating this parameter to binary. 1122 * <BR /><B CLASS=Opt>OPTIONAL</B> 1123 * 1124 * @param urlsWithMetadata 1125 * Array of candidate URLs' specs, along with any associated metadata. 1126 * Present only for SharedStorageAccessMethod: selectURL. 1127 * <BR /><B CLASS=Opt>OPTIONAL</B> 1128 * 1129 * @param urnUuid 1130 * Spec of the URN:UUID generated for a selectURL call. 1131 * Present only for SharedStorageAccessMethod: selectURL. 1132 * <BR /><B CLASS=Opt>OPTIONAL</B> 1133 * 1134 * @param key 1135 * Key for a specific entry in an origin's shared storage. 1136 * Present only for SharedStorageAccessMethods: set, append, delete, and 1137 * get. 1138 * <BR /><B CLASS=Opt>OPTIONAL</B> 1139 * 1140 * @param value 1141 * Value for a specific entry in an origin's shared storage. 1142 * Present only for SharedStorageAccessMethods: set and append. 1143 * <BR /><B CLASS=Opt>OPTIONAL</B> 1144 * 1145 * @param ignoreIfPresent 1146 * Whether or not to set an entry for a key if that key is already present. 1147 * Present only for SharedStorageAccessMethod: set. 1148 * <BR /><B CLASS=Opt>OPTIONAL</B> 1149 * 1150 * @param workletOrdinal 1151 * A number denoting the (0-based) order of the worklet's 1152 * creation relative to all other shared storage worklets created by 1153 * documents using the current storage partition. 1154 * Present only for SharedStorageAccessMethods: addModule, createWorklet. 1155 * <BR /><B CLASS=Opt>OPTIONAL</B> 1156 * 1157 * @param workletTargetId 1158 * Hex representation of the DevTools token used as the TargetID for the 1159 * associated shared storage worklet. 1160 * Present only for SharedStorageAccessMethods: addModule, createWorklet, 1161 * run, selectURL, and any other SharedStorageAccessMethod when the 1162 * SharedStorageAccessScope is sharedStorageWorklet. 1163 * <BR /><B CLASS=Opt>OPTIONAL</B> 1164 * 1165 * @param withLock 1166 * Name of the lock to be acquired, if present. 1167 * Optionally present only for SharedStorageAccessMethods: batchUpdate, 1168 * set, append, delete, and clear. 1169 * <BR /><B CLASS=Opt>OPTIONAL</B> 1170 * 1171 * @param batchUpdateId 1172 * If the method has been called as part of a batchUpdate, then this 1173 * number identifies the batch to which it belongs. 1174 * Optionally present only for SharedStorageAccessMethods: 1175 * batchUpdate (required), set, append, delete, and clear. 1176 * <BR /><B CLASS=Opt>OPTIONAL</B> 1177 * 1178 * @param batchSize 1179 * Number of modifier methods sent in batch. 1180 * Present only for SharedStorageAccessMethod: batchUpdate. 1181 * <BR /><B CLASS=Opt>OPTIONAL</B> 1182 */ 1183 public SharedStorageAccessParams( 1184 String scriptSourceUrl, String dataOrigin, String operationName, String operationId, 1185 Boolean keepAlive, 1186 Storage.SharedStoragePrivateAggregationConfig privateAggregationConfig, 1187 String serializedData, Storage.SharedStorageUrlWithMetadata[] urlsWithMetadata, 1188 String urnUuid, String key, String value, Boolean ignoreIfPresent, 1189 Integer workletOrdinal, String workletTargetId, String withLock, 1190 String batchUpdateId, Integer batchSize 1191 ) 1192 { 1193 this.scriptSourceUrl = scriptSourceUrl; 1194 this.dataOrigin = dataOrigin; 1195 this.operationName = operationName; 1196 this.operationId = operationId; 1197 this.keepAlive = keepAlive; 1198 this.privateAggregationConfig = privateAggregationConfig; 1199 this.serializedData = serializedData; 1200 this.urlsWithMetadata = urlsWithMetadata; 1201 this.urnUuid = urnUuid; 1202 this.key = key; 1203 this.value = value; 1204 this.ignoreIfPresent = ignoreIfPresent; 1205 this.workletOrdinal = workletOrdinal; 1206 this.workletTargetId = workletTargetId; 1207 this.withLock = withLock; 1208 this.batchUpdateId = batchUpdateId; 1209 this.batchSize = batchSize; 1210 } 1211 1212 /** 1213 * JSON Object Constructor 1214 * @param jo A Json-Object having data about an instance of {@code 'SharedStorageAccessParams'}. 1215 */ 1216 public SharedStorageAccessParams (JsonObject jo) 1217 { 1218 this.scriptSourceUrl = ReadJSON.getString(jo, "scriptSourceUrl", true, false); 1219 this.dataOrigin = ReadJSON.getString(jo, "dataOrigin", true, false); 1220 this.operationName = ReadJSON.getString(jo, "operationName", true, false); 1221 this.operationId = ReadJSON.getString(jo, "operationId", true, false); 1222 this.keepAlive = ReadBoxedJSON.getBoolean(jo, "keepAlive", true); 1223 this.privateAggregationConfig = ReadJSON.getObject(jo, "privateAggregationConfig", Storage.SharedStoragePrivateAggregationConfig.class, true, false); 1224 this.serializedData = ReadJSON.getString(jo, "serializedData", true, false); 1225 this.urlsWithMetadata = (jo.getJsonArray("urlsWithMetadata") == null) 1226 ? null 1227 : RJArrIntoStream.objArr(jo.getJsonArray("urlsWithMetadata"), null, 0, Storage.SharedStorageUrlWithMetadata.class).toArray(Storage.SharedStorageUrlWithMetadata[]::new); 1228 1229 this.urnUuid = ReadJSON.getString(jo, "urnUuid", true, false); 1230 this.key = ReadJSON.getString(jo, "key", true, false); 1231 this.value = ReadJSON.getString(jo, "value", true, false); 1232 this.ignoreIfPresent = ReadBoxedJSON.getBoolean(jo, "ignoreIfPresent", true); 1233 this.workletOrdinal = ReadBoxedJSON.getInteger(jo, "workletOrdinal", true); 1234 this.workletTargetId = ReadJSON.getString(jo, "workletTargetId", true, false); 1235 this.withLock = ReadJSON.getString(jo, "withLock", true, false); 1236 this.batchUpdateId = ReadJSON.getString(jo, "batchUpdateId", true, false); 1237 this.batchSize = ReadBoxedJSON.getInteger(jo, "batchSize", true); 1238 } 1239 1240 1241 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1242 public boolean equals(Object other) 1243 { 1244 if (this == other) return true; 1245 if (other == null) return false; 1246 if (other.getClass() != this.getClass()) return false; 1247 1248 SharedStorageAccessParams o = (SharedStorageAccessParams) other; 1249 1250 return 1251 Objects.equals(this.scriptSourceUrl, o.scriptSourceUrl) 1252 && Objects.equals(this.dataOrigin, o.dataOrigin) 1253 && Objects.equals(this.operationName, o.operationName) 1254 && Objects.equals(this.operationId, o.operationId) 1255 && Objects.equals(this.keepAlive, o.keepAlive) 1256 && Objects.equals(this.privateAggregationConfig, o.privateAggregationConfig) 1257 && Objects.equals(this.serializedData, o.serializedData) 1258 && Arrays.deepEquals(this.urlsWithMetadata, o.urlsWithMetadata) 1259 && Objects.equals(this.urnUuid, o.urnUuid) 1260 && Objects.equals(this.key, o.key) 1261 && Objects.equals(this.value, o.value) 1262 && Objects.equals(this.ignoreIfPresent, o.ignoreIfPresent) 1263 && Objects.equals(this.workletOrdinal, o.workletOrdinal) 1264 && Objects.equals(this.workletTargetId, o.workletTargetId) 1265 && Objects.equals(this.withLock, o.withLock) 1266 && Objects.equals(this.batchUpdateId, o.batchUpdateId) 1267 && Objects.equals(this.batchSize, o.batchSize); 1268 } 1269 1270 /** Generates a Hash-Code for {@code 'this'} instance */ 1271 public int hashCode() 1272 { 1273 return 1274 Objects.hashCode(this.scriptSourceUrl) 1275 + Objects.hashCode(this.dataOrigin) 1276 + Objects.hashCode(this.operationName) 1277 + Objects.hashCode(this.operationId) 1278 + Objects.hashCode(this.keepAlive) 1279 + this.privateAggregationConfig.hashCode() 1280 + Objects.hashCode(this.serializedData) 1281 + Arrays.deepHashCode(this.urlsWithMetadata) 1282 + Objects.hashCode(this.urnUuid) 1283 + Objects.hashCode(this.key) 1284 + Objects.hashCode(this.value) 1285 + Objects.hashCode(this.ignoreIfPresent) 1286 + Objects.hashCode(this.workletOrdinal) 1287 + Objects.hashCode(this.workletTargetId) 1288 + Objects.hashCode(this.withLock) 1289 + Objects.hashCode(this.batchUpdateId) 1290 + Objects.hashCode(this.batchSize); 1291 } 1292 } 1293 1294 /** <CODE>[No Description Provided by Google]</CODE> */ 1295 public static class StorageBucket 1296 extends BaseType 1297 implements java.io.Serializable 1298 { 1299 /** For Object Serialization. java.io.Serializable */ 1300 protected static final long serialVersionUID = 1; 1301 1302 public boolean[] optionals() 1303 { return new boolean[] { false, true, }; } 1304 1305 /** <CODE>[No Description Provided by Google]</CODE> */ 1306 public final String storageKey; 1307 1308 /** 1309 * If not specified, it is the default bucket of the storageKey. 1310 * <BR /><B CLASS=Opt>OPTIONAL</B> 1311 */ 1312 public final String name; 1313 1314 /** 1315 * Constructor 1316 * 1317 * @param storageKey - 1318 * 1319 * @param name If not specified, it is the default bucket of the storageKey. 1320 * <BR /><B CLASS=Opt>OPTIONAL</B> 1321 */ 1322 public StorageBucket(String storageKey, String name) 1323 { 1324 // Exception-Check(s) to ensure that if any parameters which are not declared as 1325 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1326 1327 if (storageKey == null) THROWS.throwNPE("storageKey"); 1328 1329 this.storageKey = storageKey; 1330 this.name = name; 1331 } 1332 1333 /** 1334 * JSON Object Constructor 1335 * @param jo A Json-Object having data about an instance of {@code 'StorageBucket'}. 1336 */ 1337 public StorageBucket (JsonObject jo) 1338 { 1339 this.storageKey = ReadJSON.getString(jo, "storageKey", false, true); 1340 this.name = ReadJSON.getString(jo, "name", true, false); 1341 } 1342 1343 1344 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1345 public boolean equals(Object other) 1346 { 1347 if (this == other) return true; 1348 if (other == null) return false; 1349 if (other.getClass() != this.getClass()) return false; 1350 1351 StorageBucket o = (StorageBucket) other; 1352 1353 return 1354 Objects.equals(this.storageKey, o.storageKey) 1355 && Objects.equals(this.name, o.name); 1356 } 1357 1358 /** Generates a Hash-Code for {@code 'this'} instance */ 1359 public int hashCode() 1360 { 1361 return 1362 Objects.hashCode(this.storageKey) 1363 + Objects.hashCode(this.name); 1364 } 1365 } 1366 1367 /** <CODE>[No Description Provided by Google]</CODE> */ 1368 public static class StorageBucketInfo 1369 extends BaseType 1370 implements java.io.Serializable 1371 { 1372 /** For Object Serialization. java.io.Serializable */ 1373 protected static final long serialVersionUID = 1; 1374 1375 public boolean[] optionals() 1376 { return new boolean[] { false, false, false, false, false, false, }; } 1377 1378 /** <CODE>[No Description Provided by Google]</CODE> */ 1379 public final Storage.StorageBucket bucket; 1380 1381 /** <CODE>[No Description Provided by Google]</CODE> */ 1382 public final String id; 1383 1384 /** <CODE>[No Description Provided by Google]</CODE> */ 1385 public final Number expiration; 1386 1387 /** Storage quota (bytes). */ 1388 public final Number quota; 1389 1390 /** <CODE>[No Description Provided by Google]</CODE> */ 1391 public final boolean persistent; 1392 1393 /** <CODE>[No Description Provided by Google]</CODE> */ 1394 public final String durability; 1395 1396 /** 1397 * Constructor 1398 * 1399 * @param bucket - 1400 * 1401 * @param id - 1402 * 1403 * @param expiration - 1404 * 1405 * @param quota Storage quota (bytes). 1406 * 1407 * @param persistent - 1408 * 1409 * @param durability - 1410 */ 1411 public StorageBucketInfo( 1412 Storage.StorageBucket bucket, String id, Number expiration, Number quota, 1413 boolean persistent, String durability 1414 ) 1415 { 1416 // Exception-Check(s) to ensure that if any parameters which are not declared as 1417 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1418 1419 if (bucket == null) THROWS.throwNPE("bucket"); 1420 if (id == null) THROWS.throwNPE("id"); 1421 if (expiration == null) THROWS.throwNPE("expiration"); 1422 if (quota == null) THROWS.throwNPE("quota"); 1423 if (durability == null) THROWS.throwNPE("durability"); 1424 1425 // Exception-Check(s) to ensure that if any parameters which must adhere to a 1426 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 1427 1428 THROWS.checkIAE("durability", durability, "Storage.StorageBucketsDurability", Storage.StorageBucketsDurability); 1429 1430 this.bucket = bucket; 1431 this.id = id; 1432 this.expiration = expiration; 1433 this.quota = quota; 1434 this.persistent = persistent; 1435 this.durability = durability; 1436 } 1437 1438 /** 1439 * JSON Object Constructor 1440 * @param jo A Json-Object having data about an instance of {@code 'StorageBucketInfo'}. 1441 */ 1442 public StorageBucketInfo (JsonObject jo) 1443 { 1444 this.bucket = ReadJSON.getObject(jo, "bucket", Storage.StorageBucket.class, false, true); 1445 this.id = ReadJSON.getString(jo, "id", false, true); 1446 this.expiration = ReadNumberJSON.get(jo, "expiration", false, true); 1447 this.quota = ReadNumberJSON.get(jo, "quota", false, true); 1448 this.persistent = ReadPrimJSON.getBoolean(jo, "persistent"); 1449 this.durability = ReadJSON.getString(jo, "durability", false, true); 1450 } 1451 1452 1453 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1454 public boolean equals(Object other) 1455 { 1456 if (this == other) return true; 1457 if (other == null) return false; 1458 if (other.getClass() != this.getClass()) return false; 1459 1460 StorageBucketInfo o = (StorageBucketInfo) other; 1461 1462 return 1463 Objects.equals(this.bucket, o.bucket) 1464 && Objects.equals(this.id, o.id) 1465 && Objects.equals(this.expiration, o.expiration) 1466 && Objects.equals(this.quota, o.quota) 1467 && (this.persistent == o.persistent) 1468 && Objects.equals(this.durability, o.durability); 1469 } 1470 1471 /** Generates a Hash-Code for {@code 'this'} instance */ 1472 public int hashCode() 1473 { 1474 return 1475 this.bucket.hashCode() 1476 + Objects.hashCode(this.id) 1477 + Objects.hashCode(this.expiration) 1478 + Objects.hashCode(this.quota) 1479 + (this.persistent ? 1 : 0) 1480 + Objects.hashCode(this.durability); 1481 } 1482 } 1483 1484 /** 1485 * <CODE>[No Description Provided by Google]</CODE> 1486 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1487 */ 1488 public static class AttributionReportingFilterDataEntry 1489 extends BaseType 1490 implements java.io.Serializable 1491 { 1492 /** For Object Serialization. java.io.Serializable */ 1493 protected static final long serialVersionUID = 1; 1494 1495 public boolean[] optionals() 1496 { return new boolean[] { false, false, }; } 1497 1498 /** <CODE>[No Description Provided by Google]</CODE> */ 1499 public final String key; 1500 1501 /** <CODE>[No Description Provided by Google]</CODE> */ 1502 public final String[] values; 1503 1504 /** 1505 * Constructor 1506 * 1507 * @param key - 1508 * 1509 * @param values - 1510 */ 1511 public AttributionReportingFilterDataEntry(String key, String[] values) 1512 { 1513 // Exception-Check(s) to ensure that if any parameters which are not declared as 1514 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1515 1516 if (key == null) THROWS.throwNPE("key"); 1517 if (values == null) THROWS.throwNPE("values"); 1518 1519 this.key = key; 1520 this.values = values; 1521 } 1522 1523 /** 1524 * JSON Object Constructor 1525 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingFilterDataEntry'}. 1526 */ 1527 public AttributionReportingFilterDataEntry (JsonObject jo) 1528 { 1529 this.key = ReadJSON.getString(jo, "key", false, true); 1530 this.values = (jo.getJsonArray("values") == null) 1531 ? null 1532 : RJArrIntoStream.strArr(jo.getJsonArray("values"), null, 0).toArray(String[]::new); 1533 1534 } 1535 1536 1537 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1538 public boolean equals(Object other) 1539 { 1540 if (this == other) return true; 1541 if (other == null) return false; 1542 if (other.getClass() != this.getClass()) return false; 1543 1544 AttributionReportingFilterDataEntry o = (AttributionReportingFilterDataEntry) other; 1545 1546 return 1547 Objects.equals(this.key, o.key) 1548 && Arrays.deepEquals(this.values, o.values); 1549 } 1550 1551 /** Generates a Hash-Code for {@code 'this'} instance */ 1552 public int hashCode() 1553 { 1554 return 1555 Objects.hashCode(this.key) 1556 + Arrays.deepHashCode(this.values); 1557 } 1558 } 1559 1560 /** 1561 * <CODE>[No Description Provided by Google]</CODE> 1562 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1563 */ 1564 public static class AttributionReportingFilterConfig 1565 extends BaseType 1566 implements java.io.Serializable 1567 { 1568 /** For Object Serialization. java.io.Serializable */ 1569 protected static final long serialVersionUID = 1; 1570 1571 public boolean[] optionals() 1572 { return new boolean[] { false, true, }; } 1573 1574 /** <CODE>[No Description Provided by Google]</CODE> */ 1575 public final Storage.AttributionReportingFilterDataEntry[] filterValues; 1576 1577 /** 1578 * duration in seconds 1579 * <BR /><B CLASS=Opt>OPTIONAL</B> 1580 */ 1581 public final Integer lookbackWindow; 1582 1583 /** 1584 * Constructor 1585 * 1586 * @param filterValues - 1587 * 1588 * @param lookbackWindow duration in seconds 1589 * <BR /><B CLASS=Opt>OPTIONAL</B> 1590 */ 1591 public AttributionReportingFilterConfig 1592 (Storage.AttributionReportingFilterDataEntry[] filterValues, Integer lookbackWindow) 1593 { 1594 // Exception-Check(s) to ensure that if any parameters which are not declared as 1595 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1596 1597 if (filterValues == null) THROWS.throwNPE("filterValues"); 1598 1599 this.filterValues = filterValues; 1600 this.lookbackWindow = lookbackWindow; 1601 } 1602 1603 /** 1604 * JSON Object Constructor 1605 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingFilterConfig'}. 1606 */ 1607 public AttributionReportingFilterConfig (JsonObject jo) 1608 { 1609 this.filterValues = (jo.getJsonArray("filterValues") == null) 1610 ? null 1611 : RJArrIntoStream.objArr(jo.getJsonArray("filterValues"), null, 0, Storage.AttributionReportingFilterDataEntry.class).toArray(Storage.AttributionReportingFilterDataEntry[]::new); 1612 1613 this.lookbackWindow = ReadBoxedJSON.getInteger(jo, "lookbackWindow", true); 1614 } 1615 1616 1617 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1618 public boolean equals(Object other) 1619 { 1620 if (this == other) return true; 1621 if (other == null) return false; 1622 if (other.getClass() != this.getClass()) return false; 1623 1624 AttributionReportingFilterConfig o = (AttributionReportingFilterConfig) other; 1625 1626 return 1627 Arrays.deepEquals(this.filterValues, o.filterValues) 1628 && Objects.equals(this.lookbackWindow, o.lookbackWindow); 1629 } 1630 1631 /** Generates a Hash-Code for {@code 'this'} instance */ 1632 public int hashCode() 1633 { 1634 return 1635 Arrays.deepHashCode(this.filterValues) 1636 + Objects.hashCode(this.lookbackWindow); 1637 } 1638 } 1639 1640 /** 1641 * <CODE>[No Description Provided by Google]</CODE> 1642 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1643 */ 1644 public static class AttributionReportingFilterPair 1645 extends BaseType 1646 implements java.io.Serializable 1647 { 1648 /** For Object Serialization. java.io.Serializable */ 1649 protected static final long serialVersionUID = 1; 1650 1651 public boolean[] optionals() 1652 { return new boolean[] { false, false, }; } 1653 1654 /** <CODE>[No Description Provided by Google]</CODE> */ 1655 public final Storage.AttributionReportingFilterConfig[] filters; 1656 1657 /** <CODE>[No Description Provided by Google]</CODE> */ 1658 public final Storage.AttributionReportingFilterConfig[] notFilters; 1659 1660 /** 1661 * Constructor 1662 * 1663 * @param filters - 1664 * 1665 * @param notFilters - 1666 */ 1667 public AttributionReportingFilterPair( 1668 Storage.AttributionReportingFilterConfig[] filters, 1669 Storage.AttributionReportingFilterConfig[] notFilters 1670 ) 1671 { 1672 // Exception-Check(s) to ensure that if any parameters which are not declared as 1673 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1674 1675 if (filters == null) THROWS.throwNPE("filters"); 1676 if (notFilters == null) THROWS.throwNPE("notFilters"); 1677 1678 this.filters = filters; 1679 this.notFilters = notFilters; 1680 } 1681 1682 /** 1683 * JSON Object Constructor 1684 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingFilterPair'}. 1685 */ 1686 public AttributionReportingFilterPair (JsonObject jo) 1687 { 1688 this.filters = (jo.getJsonArray("filters") == null) 1689 ? null 1690 : RJArrIntoStream.objArr(jo.getJsonArray("filters"), null, 0, Storage.AttributionReportingFilterConfig.class).toArray(Storage.AttributionReportingFilterConfig[]::new); 1691 1692 this.notFilters = (jo.getJsonArray("notFilters") == null) 1693 ? null 1694 : RJArrIntoStream.objArr(jo.getJsonArray("notFilters"), null, 0, Storage.AttributionReportingFilterConfig.class).toArray(Storage.AttributionReportingFilterConfig[]::new); 1695 1696 } 1697 1698 1699 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1700 public boolean equals(Object other) 1701 { 1702 if (this == other) return true; 1703 if (other == null) return false; 1704 if (other.getClass() != this.getClass()) return false; 1705 1706 AttributionReportingFilterPair o = (AttributionReportingFilterPair) other; 1707 1708 return 1709 Arrays.deepEquals(this.filters, o.filters) 1710 && Arrays.deepEquals(this.notFilters, o.notFilters); 1711 } 1712 1713 /** Generates a Hash-Code for {@code 'this'} instance */ 1714 public int hashCode() 1715 { 1716 return 1717 Arrays.deepHashCode(this.filters) 1718 + Arrays.deepHashCode(this.notFilters); 1719 } 1720 } 1721 1722 /** 1723 * <CODE>[No Description Provided by Google]</CODE> 1724 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1725 */ 1726 public static class AttributionReportingAggregationKeysEntry 1727 extends BaseType 1728 implements java.io.Serializable 1729 { 1730 /** For Object Serialization. java.io.Serializable */ 1731 protected static final long serialVersionUID = 1; 1732 1733 public boolean[] optionals() 1734 { return new boolean[] { false, false, }; } 1735 1736 /** <CODE>[No Description Provided by Google]</CODE> */ 1737 public final String key; 1738 1739 /** <CODE>[No Description Provided by Google]</CODE> */ 1740 public final String value; 1741 1742 /** 1743 * Constructor 1744 * 1745 * @param key - 1746 * 1747 * @param value - 1748 */ 1749 public AttributionReportingAggregationKeysEntry(String key, String value) 1750 { 1751 // Exception-Check(s) to ensure that if any parameters which are not declared as 1752 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1753 1754 if (key == null) THROWS.throwNPE("key"); 1755 if (value == null) THROWS.throwNPE("value"); 1756 1757 this.key = key; 1758 this.value = value; 1759 } 1760 1761 /** 1762 * JSON Object Constructor 1763 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregationKeysEntry'}. 1764 */ 1765 public AttributionReportingAggregationKeysEntry (JsonObject jo) 1766 { 1767 this.key = ReadJSON.getString(jo, "key", false, true); 1768 this.value = ReadJSON.getString(jo, "value", false, true); 1769 } 1770 1771 1772 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1773 public boolean equals(Object other) 1774 { 1775 if (this == other) return true; 1776 if (other == null) return false; 1777 if (other.getClass() != this.getClass()) return false; 1778 1779 AttributionReportingAggregationKeysEntry o = (AttributionReportingAggregationKeysEntry) other; 1780 1781 return 1782 Objects.equals(this.key, o.key) 1783 && Objects.equals(this.value, o.value); 1784 } 1785 1786 /** Generates a Hash-Code for {@code 'this'} instance */ 1787 public int hashCode() 1788 { 1789 return 1790 Objects.hashCode(this.key) 1791 + Objects.hashCode(this.value); 1792 } 1793 } 1794 1795 /** 1796 * <CODE>[No Description Provided by Google]</CODE> 1797 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1798 */ 1799 public static class AttributionReportingEventReportWindows 1800 extends BaseType 1801 implements java.io.Serializable 1802 { 1803 /** For Object Serialization. java.io.Serializable */ 1804 protected static final long serialVersionUID = 1; 1805 1806 public boolean[] optionals() 1807 { return new boolean[] { false, false, }; } 1808 1809 /** duration in seconds */ 1810 public final int start; 1811 1812 /** duration in seconds */ 1813 public final int[] ends; 1814 1815 /** 1816 * Constructor 1817 * 1818 * @param start duration in seconds 1819 * 1820 * @param ends duration in seconds 1821 */ 1822 public AttributionReportingEventReportWindows(int start, int[] ends) 1823 { 1824 // Exception-Check(s) to ensure that if any parameters which are not declared as 1825 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1826 1827 if (ends == null) THROWS.throwNPE("ends"); 1828 1829 this.start = start; 1830 this.ends = ends; 1831 } 1832 1833 /** 1834 * JSON Object Constructor 1835 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingEventReportWindows'}. 1836 */ 1837 public AttributionReportingEventReportWindows (JsonObject jo) 1838 { 1839 this.start = ReadPrimJSON.getInt(jo, "start"); 1840 this.ends = (jo.getJsonArray("ends") == null) 1841 ? null 1842 : RJArrIntoPrimArray.intArr(jo.getJsonArray("ends"), -1, 0, null); 1843 1844 } 1845 1846 1847 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1848 public boolean equals(Object other) 1849 { 1850 if (this == other) return true; 1851 if (other == null) return false; 1852 if (other.getClass() != this.getClass()) return false; 1853 1854 AttributionReportingEventReportWindows o = (AttributionReportingEventReportWindows) other; 1855 1856 return 1857 (this.start == o.start) 1858 && Arrays.equals(this.ends, o.ends); 1859 } 1860 1861 /** Generates a Hash-Code for {@code 'this'} instance */ 1862 public int hashCode() 1863 { 1864 return 1865 this.start 1866 + Arrays.hashCode(this.ends); 1867 } 1868 } 1869 1870 /** 1871 * <CODE>[No Description Provided by Google]</CODE> 1872 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1873 */ 1874 public static class AttributionReportingAggregatableDebugReportingData 1875 extends BaseType 1876 implements java.io.Serializable 1877 { 1878 /** For Object Serialization. java.io.Serializable */ 1879 protected static final long serialVersionUID = 1; 1880 1881 public boolean[] optionals() 1882 { return new boolean[] { false, false, false, }; } 1883 1884 /** <CODE>[No Description Provided by Google]</CODE> */ 1885 public final String keyPiece; 1886 1887 /** 1888 * number instead of integer because not all uint32 can be represented by 1889 * int 1890 */ 1891 public final Number value; 1892 1893 /** <CODE>[No Description Provided by Google]</CODE> */ 1894 public final String[] types; 1895 1896 /** 1897 * Constructor 1898 * 1899 * @param keyPiece - 1900 * 1901 * @param value 1902 * number instead of integer because not all uint32 can be represented by 1903 * int 1904 * 1905 * @param types - 1906 */ 1907 public AttributionReportingAggregatableDebugReportingData 1908 (String keyPiece, Number value, String[] types) 1909 { 1910 // Exception-Check(s) to ensure that if any parameters which are not declared as 1911 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 1912 1913 if (keyPiece == null) THROWS.throwNPE("keyPiece"); 1914 if (value == null) THROWS.throwNPE("value"); 1915 if (types == null) THROWS.throwNPE("types"); 1916 1917 this.keyPiece = keyPiece; 1918 this.value = value; 1919 this.types = types; 1920 } 1921 1922 /** 1923 * JSON Object Constructor 1924 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableDebugReportingData'}. 1925 */ 1926 public AttributionReportingAggregatableDebugReportingData (JsonObject jo) 1927 { 1928 this.keyPiece = ReadJSON.getString(jo, "keyPiece", false, true); 1929 this.value = ReadNumberJSON.get(jo, "value", false, true); 1930 this.types = (jo.getJsonArray("types") == null) 1931 ? null 1932 : RJArrIntoStream.strArr(jo.getJsonArray("types"), null, 0).toArray(String[]::new); 1933 1934 } 1935 1936 1937 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 1938 public boolean equals(Object other) 1939 { 1940 if (this == other) return true; 1941 if (other == null) return false; 1942 if (other.getClass() != this.getClass()) return false; 1943 1944 AttributionReportingAggregatableDebugReportingData o = (AttributionReportingAggregatableDebugReportingData) other; 1945 1946 return 1947 Objects.equals(this.keyPiece, o.keyPiece) 1948 && Objects.equals(this.value, o.value) 1949 && Arrays.deepEquals(this.types, o.types); 1950 } 1951 1952 /** Generates a Hash-Code for {@code 'this'} instance */ 1953 public int hashCode() 1954 { 1955 return 1956 Objects.hashCode(this.keyPiece) 1957 + Objects.hashCode(this.value) 1958 + Arrays.deepHashCode(this.types); 1959 } 1960 } 1961 1962 /** 1963 * <CODE>[No Description Provided by Google]</CODE> 1964 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 1965 */ 1966 public static class AttributionReportingAggregatableDebugReportingConfig 1967 extends BaseType 1968 implements java.io.Serializable 1969 { 1970 /** For Object Serialization. java.io.Serializable */ 1971 protected static final long serialVersionUID = 1; 1972 1973 public boolean[] optionals() 1974 { return new boolean[] { true, false, false, true, }; } 1975 1976 /** 1977 * number instead of integer because not all uint32 can be represented by 1978 * int, only present for source registrations 1979 * <BR /><B CLASS=Opt>OPTIONAL</B> 1980 */ 1981 public final Number budget; 1982 1983 /** <CODE>[No Description Provided by Google]</CODE> */ 1984 public final String keyPiece; 1985 1986 /** <CODE>[No Description Provided by Google]</CODE> */ 1987 public final Storage.AttributionReportingAggregatableDebugReportingData[] debugData; 1988 1989 /** 1990 * <CODE>[No Description Provided by Google]</CODE> 1991 * <BR /><B CLASS=Opt>OPTIONAL</B> 1992 */ 1993 public final String aggregationCoordinatorOrigin; 1994 1995 /** 1996 * Constructor 1997 * 1998 * @param budget 1999 * number instead of integer because not all uint32 can be represented by 2000 * int, only present for source registrations 2001 * <BR /><B CLASS=Opt>OPTIONAL</B> 2002 * 2003 * @param keyPiece - 2004 * 2005 * @param debugData - 2006 * 2007 * @param aggregationCoordinatorOrigin - 2008 * <BR /><B CLASS=Opt>OPTIONAL</B> 2009 */ 2010 public AttributionReportingAggregatableDebugReportingConfig( 2011 Number budget, String keyPiece, 2012 Storage.AttributionReportingAggregatableDebugReportingData[] debugData, 2013 String aggregationCoordinatorOrigin 2014 ) 2015 { 2016 // Exception-Check(s) to ensure that if any parameters which are not declared as 2017 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2018 2019 if (keyPiece == null) THROWS.throwNPE("keyPiece"); 2020 if (debugData == null) THROWS.throwNPE("debugData"); 2021 2022 this.budget = budget; 2023 this.keyPiece = keyPiece; 2024 this.debugData = debugData; 2025 this.aggregationCoordinatorOrigin = aggregationCoordinatorOrigin; 2026 } 2027 2028 /** 2029 * JSON Object Constructor 2030 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableDebugReportingConfig'}. 2031 */ 2032 public AttributionReportingAggregatableDebugReportingConfig (JsonObject jo) 2033 { 2034 this.budget = ReadNumberJSON.get(jo, "budget", true, false); 2035 this.keyPiece = ReadJSON.getString(jo, "keyPiece", false, true); 2036 this.debugData = (jo.getJsonArray("debugData") == null) 2037 ? null 2038 : RJArrIntoStream.objArr(jo.getJsonArray("debugData"), null, 0, Storage.AttributionReportingAggregatableDebugReportingData.class).toArray(Storage.AttributionReportingAggregatableDebugReportingData[]::new); 2039 2040 this.aggregationCoordinatorOrigin = ReadJSON.getString(jo, "aggregationCoordinatorOrigin", true, false); 2041 } 2042 2043 2044 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2045 public boolean equals(Object other) 2046 { 2047 if (this == other) return true; 2048 if (other == null) return false; 2049 if (other.getClass() != this.getClass()) return false; 2050 2051 AttributionReportingAggregatableDebugReportingConfig o = (AttributionReportingAggregatableDebugReportingConfig) other; 2052 2053 return 2054 Objects.equals(this.budget, o.budget) 2055 && Objects.equals(this.keyPiece, o.keyPiece) 2056 && Arrays.deepEquals(this.debugData, o.debugData) 2057 && Objects.equals(this.aggregationCoordinatorOrigin, o.aggregationCoordinatorOrigin); 2058 } 2059 2060 /** Generates a Hash-Code for {@code 'this'} instance */ 2061 public int hashCode() 2062 { 2063 return 2064 Objects.hashCode(this.budget) 2065 + Objects.hashCode(this.keyPiece) 2066 + Arrays.deepHashCode(this.debugData) 2067 + Objects.hashCode(this.aggregationCoordinatorOrigin); 2068 } 2069 } 2070 2071 /** 2072 * <CODE>[No Description Provided by Google]</CODE> 2073 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2074 */ 2075 public static class AttributionScopesData 2076 extends BaseType 2077 implements java.io.Serializable 2078 { 2079 /** For Object Serialization. java.io.Serializable */ 2080 protected static final long serialVersionUID = 1; 2081 2082 public boolean[] optionals() 2083 { return new boolean[] { false, false, false, }; } 2084 2085 /** <CODE>[No Description Provided by Google]</CODE> */ 2086 public final String[] values; 2087 2088 /** 2089 * number instead of integer because not all uint32 can be represented by 2090 * int 2091 */ 2092 public final Number limit; 2093 2094 /** <CODE>[No Description Provided by Google]</CODE> */ 2095 public final Number maxEventStates; 2096 2097 /** 2098 * Constructor 2099 * 2100 * @param values - 2101 * 2102 * @param limit 2103 * number instead of integer because not all uint32 can be represented by 2104 * int 2105 * 2106 * @param maxEventStates - 2107 */ 2108 public AttributionScopesData(String[] values, Number limit, Number maxEventStates) 2109 { 2110 // Exception-Check(s) to ensure that if any parameters which are not declared as 2111 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2112 2113 if (values == null) THROWS.throwNPE("values"); 2114 if (limit == null) THROWS.throwNPE("limit"); 2115 if (maxEventStates == null) THROWS.throwNPE("maxEventStates"); 2116 2117 this.values = values; 2118 this.limit = limit; 2119 this.maxEventStates = maxEventStates; 2120 } 2121 2122 /** 2123 * JSON Object Constructor 2124 * @param jo A Json-Object having data about an instance of {@code 'AttributionScopesData'}. 2125 */ 2126 public AttributionScopesData (JsonObject jo) 2127 { 2128 this.values = (jo.getJsonArray("values") == null) 2129 ? null 2130 : RJArrIntoStream.strArr(jo.getJsonArray("values"), null, 0).toArray(String[]::new); 2131 2132 this.limit = ReadNumberJSON.get(jo, "limit", false, true); 2133 this.maxEventStates = ReadNumberJSON.get(jo, "maxEventStates", false, true); 2134 } 2135 2136 2137 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2138 public boolean equals(Object other) 2139 { 2140 if (this == other) return true; 2141 if (other == null) return false; 2142 if (other.getClass() != this.getClass()) return false; 2143 2144 AttributionScopesData o = (AttributionScopesData) other; 2145 2146 return 2147 Arrays.deepEquals(this.values, o.values) 2148 && Objects.equals(this.limit, o.limit) 2149 && Objects.equals(this.maxEventStates, o.maxEventStates); 2150 } 2151 2152 /** Generates a Hash-Code for {@code 'this'} instance */ 2153 public int hashCode() 2154 { 2155 return 2156 Arrays.deepHashCode(this.values) 2157 + Objects.hashCode(this.limit) 2158 + Objects.hashCode(this.maxEventStates); 2159 } 2160 } 2161 2162 /** 2163 * <CODE>[No Description Provided by Google]</CODE> 2164 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2165 */ 2166 public static class AttributionReportingNamedBudgetDef 2167 extends BaseType 2168 implements java.io.Serializable 2169 { 2170 /** For Object Serialization. java.io.Serializable */ 2171 protected static final long serialVersionUID = 1; 2172 2173 public boolean[] optionals() 2174 { return new boolean[] { false, false, }; } 2175 2176 /** <CODE>[No Description Provided by Google]</CODE> */ 2177 public final String name; 2178 2179 /** <CODE>[No Description Provided by Google]</CODE> */ 2180 public final int budget; 2181 2182 /** 2183 * Constructor 2184 * 2185 * @param name - 2186 * 2187 * @param budget - 2188 */ 2189 public AttributionReportingNamedBudgetDef(String name, int budget) 2190 { 2191 // Exception-Check(s) to ensure that if any parameters which are not declared as 2192 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2193 2194 if (name == null) THROWS.throwNPE("name"); 2195 2196 this.name = name; 2197 this.budget = budget; 2198 } 2199 2200 /** 2201 * JSON Object Constructor 2202 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingNamedBudgetDef'}. 2203 */ 2204 public AttributionReportingNamedBudgetDef (JsonObject jo) 2205 { 2206 this.name = ReadJSON.getString(jo, "name", false, true); 2207 this.budget = ReadPrimJSON.getInt(jo, "budget"); 2208 } 2209 2210 2211 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2212 public boolean equals(Object other) 2213 { 2214 if (this == other) return true; 2215 if (other == null) return false; 2216 if (other.getClass() != this.getClass()) return false; 2217 2218 AttributionReportingNamedBudgetDef o = (AttributionReportingNamedBudgetDef) other; 2219 2220 return 2221 Objects.equals(this.name, o.name) 2222 && (this.budget == o.budget); 2223 } 2224 2225 /** Generates a Hash-Code for {@code 'this'} instance */ 2226 public int hashCode() 2227 { 2228 return 2229 Objects.hashCode(this.name) 2230 + this.budget; 2231 } 2232 } 2233 2234 /** 2235 * <CODE>[No Description Provided by Google]</CODE> 2236 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2237 */ 2238 public static class AttributionReportingSourceRegistration 2239 extends BaseType 2240 implements java.io.Serializable 2241 { 2242 /** For Object Serialization. java.io.Serializable */ 2243 protected static final long serialVersionUID = 1; 2244 2245 public boolean[] optionals() 2246 { return new boolean[] { false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, }; } 2247 2248 /** <CODE>[No Description Provided by Google]</CODE> */ 2249 public final Number time; 2250 2251 /** duration in seconds */ 2252 public final int expiry; 2253 2254 /** 2255 * number instead of integer because not all uint32 can be represented by 2256 * int 2257 */ 2258 public final Number[] triggerData; 2259 2260 /** <CODE>[No Description Provided by Google]</CODE> */ 2261 public final Storage.AttributionReportingEventReportWindows eventReportWindows; 2262 2263 /** duration in seconds */ 2264 public final int aggregatableReportWindow; 2265 2266 /** <CODE>[No Description Provided by Google]</CODE> */ 2267 public final String type; 2268 2269 /** <CODE>[No Description Provided by Google]</CODE> */ 2270 public final String sourceOrigin; 2271 2272 /** <CODE>[No Description Provided by Google]</CODE> */ 2273 public final String reportingOrigin; 2274 2275 /** <CODE>[No Description Provided by Google]</CODE> */ 2276 public final String[] destinationSites; 2277 2278 /** <CODE>[No Description Provided by Google]</CODE> */ 2279 public final String eventId; 2280 2281 /** <CODE>[No Description Provided by Google]</CODE> */ 2282 public final String priority; 2283 2284 /** <CODE>[No Description Provided by Google]</CODE> */ 2285 public final Storage.AttributionReportingFilterDataEntry[] filterData; 2286 2287 /** <CODE>[No Description Provided by Google]</CODE> */ 2288 public final Storage.AttributionReportingAggregationKeysEntry[] aggregationKeys; 2289 2290 /** 2291 * <CODE>[No Description Provided by Google]</CODE> 2292 * <BR /><B CLASS=Opt>OPTIONAL</B> 2293 */ 2294 public final String debugKey; 2295 2296 /** <CODE>[No Description Provided by Google]</CODE> */ 2297 public final String triggerDataMatching; 2298 2299 /** <CODE>[No Description Provided by Google]</CODE> */ 2300 public final String destinationLimitPriority; 2301 2302 /** <CODE>[No Description Provided by Google]</CODE> */ 2303 public final Storage.AttributionReportingAggregatableDebugReportingConfig aggregatableDebugReportingConfig; 2304 2305 /** 2306 * <CODE>[No Description Provided by Google]</CODE> 2307 * <BR /><B CLASS=Opt>OPTIONAL</B> 2308 */ 2309 public final Storage.AttributionScopesData scopesData; 2310 2311 /** <CODE>[No Description Provided by Google]</CODE> */ 2312 public final int maxEventLevelReports; 2313 2314 /** <CODE>[No Description Provided by Google]</CODE> */ 2315 public final Storage.AttributionReportingNamedBudgetDef[] namedBudgets; 2316 2317 /** <CODE>[No Description Provided by Google]</CODE> */ 2318 public final boolean debugReporting; 2319 2320 /** <CODE>[No Description Provided by Google]</CODE> */ 2321 public final Number eventLevelEpsilon; 2322 2323 /** 2324 * Constructor 2325 * 2326 * @param time - 2327 * 2328 * @param expiry duration in seconds 2329 * 2330 * @param triggerData 2331 * number instead of integer because not all uint32 can be represented by 2332 * int 2333 * 2334 * @param eventReportWindows - 2335 * 2336 * @param aggregatableReportWindow duration in seconds 2337 * 2338 * @param type - 2339 * 2340 * @param sourceOrigin - 2341 * 2342 * @param reportingOrigin - 2343 * 2344 * @param destinationSites - 2345 * 2346 * @param eventId - 2347 * 2348 * @param priority - 2349 * 2350 * @param filterData - 2351 * 2352 * @param aggregationKeys - 2353 * 2354 * @param debugKey - 2355 * <BR /><B CLASS=Opt>OPTIONAL</B> 2356 * 2357 * @param triggerDataMatching - 2358 * 2359 * @param destinationLimitPriority - 2360 * 2361 * @param aggregatableDebugReportingConfig - 2362 * 2363 * @param scopesData - 2364 * <BR /><B CLASS=Opt>OPTIONAL</B> 2365 * 2366 * @param maxEventLevelReports - 2367 * 2368 * @param namedBudgets - 2369 * 2370 * @param debugReporting - 2371 * 2372 * @param eventLevelEpsilon - 2373 */ 2374 public AttributionReportingSourceRegistration( 2375 Number time, int expiry, Number[] triggerData, 2376 Storage.AttributionReportingEventReportWindows eventReportWindows, 2377 int aggregatableReportWindow, String type, String sourceOrigin, 2378 String reportingOrigin, String[] destinationSites, String eventId, String priority, 2379 Storage.AttributionReportingFilterDataEntry[] filterData, 2380 Storage.AttributionReportingAggregationKeysEntry[] aggregationKeys, String debugKey, 2381 String triggerDataMatching, String destinationLimitPriority, 2382 Storage.AttributionReportingAggregatableDebugReportingConfig aggregatableDebugReportingConfig, 2383 Storage.AttributionScopesData scopesData, int maxEventLevelReports, 2384 Storage.AttributionReportingNamedBudgetDef[] namedBudgets, boolean debugReporting, 2385 Number eventLevelEpsilon 2386 ) 2387 { 2388 // Exception-Check(s) to ensure that if any parameters which are not declared as 2389 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2390 2391 if (time == null) THROWS.throwNPE("time"); 2392 if (triggerData == null) THROWS.throwNPE("triggerData"); 2393 if (eventReportWindows == null) THROWS.throwNPE("eventReportWindows"); 2394 if (type == null) THROWS.throwNPE("type"); 2395 if (sourceOrigin == null) THROWS.throwNPE("sourceOrigin"); 2396 if (reportingOrigin == null) THROWS.throwNPE("reportingOrigin"); 2397 if (destinationSites == null) THROWS.throwNPE("destinationSites"); 2398 if (eventId == null) THROWS.throwNPE("eventId"); 2399 if (priority == null) THROWS.throwNPE("priority"); 2400 if (filterData == null) THROWS.throwNPE("filterData"); 2401 if (aggregationKeys == null) THROWS.throwNPE("aggregationKeys"); 2402 if (triggerDataMatching == null) THROWS.throwNPE("triggerDataMatching"); 2403 if (destinationLimitPriority == null) THROWS.throwNPE("destinationLimitPriority"); 2404 if (aggregatableDebugReportingConfig == null) THROWS.throwNPE("aggregatableDebugReportingConfig"); 2405 if (namedBudgets == null) THROWS.throwNPE("namedBudgets"); 2406 if (eventLevelEpsilon == null) THROWS.throwNPE("eventLevelEpsilon"); 2407 2408 // Exception-Check(s) to ensure that if any parameters which must adhere to a 2409 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 2410 2411 THROWS.checkIAE("type", type, "Storage.AttributionReportingSourceType", Storage.AttributionReportingSourceType); 2412 THROWS.checkIAE("triggerDataMatching", triggerDataMatching, "Storage.AttributionReportingTriggerDataMatching", Storage.AttributionReportingTriggerDataMatching); 2413 2414 this.time = time; 2415 this.expiry = expiry; 2416 this.triggerData = triggerData; 2417 this.eventReportWindows = eventReportWindows; 2418 this.aggregatableReportWindow = aggregatableReportWindow; 2419 this.type = type; 2420 this.sourceOrigin = sourceOrigin; 2421 this.reportingOrigin = reportingOrigin; 2422 this.destinationSites = destinationSites; 2423 this.eventId = eventId; 2424 this.priority = priority; 2425 this.filterData = filterData; 2426 this.aggregationKeys = aggregationKeys; 2427 this.debugKey = debugKey; 2428 this.triggerDataMatching = triggerDataMatching; 2429 this.destinationLimitPriority = destinationLimitPriority; 2430 this.aggregatableDebugReportingConfig = aggregatableDebugReportingConfig; 2431 this.scopesData = scopesData; 2432 this.maxEventLevelReports = maxEventLevelReports; 2433 this.namedBudgets = namedBudgets; 2434 this.debugReporting = debugReporting; 2435 this.eventLevelEpsilon = eventLevelEpsilon; 2436 } 2437 2438 /** 2439 * JSON Object Constructor 2440 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingSourceRegistration'}. 2441 */ 2442 public AttributionReportingSourceRegistration (JsonObject jo) 2443 { 2444 this.time = ReadNumberJSON.get(jo, "time", false, true); 2445 this.expiry = ReadPrimJSON.getInt(jo, "expiry"); 2446 this.triggerData = (jo.getJsonArray("triggerData") == null) 2447 ? null 2448 : RJArrIntoBoxedStream.numberArr(jo.getJsonArray("triggerData"), -1, 0, null).toArray(Number[]::new); 2449 2450 this.eventReportWindows = ReadJSON.getObject(jo, "eventReportWindows", Storage.AttributionReportingEventReportWindows.class, false, true); 2451 this.aggregatableReportWindow = ReadPrimJSON.getInt(jo, "aggregatableReportWindow"); 2452 this.type = ReadJSON.getString(jo, "type", false, true); 2453 this.sourceOrigin = ReadJSON.getString(jo, "sourceOrigin", false, true); 2454 this.reportingOrigin = ReadJSON.getString(jo, "reportingOrigin", false, true); 2455 this.destinationSites = (jo.getJsonArray("destinationSites") == null) 2456 ? null 2457 : RJArrIntoStream.strArr(jo.getJsonArray("destinationSites"), null, 0).toArray(String[]::new); 2458 2459 this.eventId = ReadJSON.getString(jo, "eventId", false, true); 2460 this.priority = ReadJSON.getString(jo, "priority", false, true); 2461 this.filterData = (jo.getJsonArray("filterData") == null) 2462 ? null 2463 : RJArrIntoStream.objArr(jo.getJsonArray("filterData"), null, 0, Storage.AttributionReportingFilterDataEntry.class).toArray(Storage.AttributionReportingFilterDataEntry[]::new); 2464 2465 this.aggregationKeys = (jo.getJsonArray("aggregationKeys") == null) 2466 ? null 2467 : RJArrIntoStream.objArr(jo.getJsonArray("aggregationKeys"), null, 0, Storage.AttributionReportingAggregationKeysEntry.class).toArray(Storage.AttributionReportingAggregationKeysEntry[]::new); 2468 2469 this.debugKey = ReadJSON.getString(jo, "debugKey", true, false); 2470 this.triggerDataMatching = ReadJSON.getString(jo, "triggerDataMatching", false, true); 2471 this.destinationLimitPriority = ReadJSON.getString(jo, "destinationLimitPriority", false, true); 2472 this.aggregatableDebugReportingConfig = ReadJSON.getObject(jo, "aggregatableDebugReportingConfig", Storage.AttributionReportingAggregatableDebugReportingConfig.class, false, true); 2473 this.scopesData = ReadJSON.getObject(jo, "scopesData", Storage.AttributionScopesData.class, true, false); 2474 this.maxEventLevelReports = ReadPrimJSON.getInt(jo, "maxEventLevelReports"); 2475 this.namedBudgets = (jo.getJsonArray("namedBudgets") == null) 2476 ? null 2477 : RJArrIntoStream.objArr(jo.getJsonArray("namedBudgets"), null, 0, Storage.AttributionReportingNamedBudgetDef.class).toArray(Storage.AttributionReportingNamedBudgetDef[]::new); 2478 2479 this.debugReporting = ReadPrimJSON.getBoolean(jo, "debugReporting"); 2480 this.eventLevelEpsilon = ReadNumberJSON.get(jo, "eventLevelEpsilon", false, true); 2481 } 2482 2483 2484 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2485 public boolean equals(Object other) 2486 { 2487 if (this == other) return true; 2488 if (other == null) return false; 2489 if (other.getClass() != this.getClass()) return false; 2490 2491 AttributionReportingSourceRegistration o = (AttributionReportingSourceRegistration) other; 2492 2493 return 2494 Objects.equals(this.time, o.time) 2495 && (this.expiry == o.expiry) 2496 && Arrays.deepEquals(this.triggerData, o.triggerData) 2497 && Objects.equals(this.eventReportWindows, o.eventReportWindows) 2498 && (this.aggregatableReportWindow == o.aggregatableReportWindow) 2499 && Objects.equals(this.type, o.type) 2500 && Objects.equals(this.sourceOrigin, o.sourceOrigin) 2501 && Objects.equals(this.reportingOrigin, o.reportingOrigin) 2502 && Arrays.deepEquals(this.destinationSites, o.destinationSites) 2503 && Objects.equals(this.eventId, o.eventId) 2504 && Objects.equals(this.priority, o.priority) 2505 && Arrays.deepEquals(this.filterData, o.filterData) 2506 && Arrays.deepEquals(this.aggregationKeys, o.aggregationKeys) 2507 && Objects.equals(this.debugKey, o.debugKey) 2508 && Objects.equals(this.triggerDataMatching, o.triggerDataMatching) 2509 && Objects.equals(this.destinationLimitPriority, o.destinationLimitPriority) 2510 && Objects.equals(this.aggregatableDebugReportingConfig, o.aggregatableDebugReportingConfig) 2511 && Objects.equals(this.scopesData, o.scopesData) 2512 && (this.maxEventLevelReports == o.maxEventLevelReports) 2513 && Arrays.deepEquals(this.namedBudgets, o.namedBudgets) 2514 && (this.debugReporting == o.debugReporting) 2515 && Objects.equals(this.eventLevelEpsilon, o.eventLevelEpsilon); 2516 } 2517 2518 /** Generates a Hash-Code for {@code 'this'} instance */ 2519 public int hashCode() 2520 { 2521 return 2522 Objects.hashCode(this.time) 2523 + this.expiry 2524 + Arrays.deepHashCode(this.triggerData) 2525 + this.eventReportWindows.hashCode() 2526 + this.aggregatableReportWindow 2527 + Objects.hashCode(this.type) 2528 + Objects.hashCode(this.sourceOrigin) 2529 + Objects.hashCode(this.reportingOrigin) 2530 + Arrays.deepHashCode(this.destinationSites) 2531 + Objects.hashCode(this.eventId) 2532 + Objects.hashCode(this.priority) 2533 + Arrays.deepHashCode(this.filterData) 2534 + Arrays.deepHashCode(this.aggregationKeys) 2535 + Objects.hashCode(this.debugKey) 2536 + Objects.hashCode(this.triggerDataMatching) 2537 + Objects.hashCode(this.destinationLimitPriority) 2538 + this.aggregatableDebugReportingConfig.hashCode() 2539 + this.scopesData.hashCode() 2540 + this.maxEventLevelReports 2541 + Arrays.deepHashCode(this.namedBudgets) 2542 + (this.debugReporting ? 1 : 0) 2543 + Objects.hashCode(this.eventLevelEpsilon); 2544 } 2545 } 2546 2547 /** 2548 * <CODE>[No Description Provided by Google]</CODE> 2549 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2550 */ 2551 public static class AttributionReportingAggregatableValueDictEntry 2552 extends BaseType 2553 implements java.io.Serializable 2554 { 2555 /** For Object Serialization. java.io.Serializable */ 2556 protected static final long serialVersionUID = 1; 2557 2558 public boolean[] optionals() 2559 { return new boolean[] { false, false, false, }; } 2560 2561 /** <CODE>[No Description Provided by Google]</CODE> */ 2562 public final String key; 2563 2564 /** 2565 * number instead of integer because not all uint32 can be represented by 2566 * int 2567 */ 2568 public final Number value; 2569 2570 /** <CODE>[No Description Provided by Google]</CODE> */ 2571 public final String filteringId; 2572 2573 /** 2574 * Constructor 2575 * 2576 * @param key - 2577 * 2578 * @param value 2579 * number instead of integer because not all uint32 can be represented by 2580 * int 2581 * 2582 * @param filteringId - 2583 */ 2584 public AttributionReportingAggregatableValueDictEntry 2585 (String key, Number value, String filteringId) 2586 { 2587 // Exception-Check(s) to ensure that if any parameters which are not declared as 2588 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2589 2590 if (key == null) THROWS.throwNPE("key"); 2591 if (value == null) THROWS.throwNPE("value"); 2592 if (filteringId == null) THROWS.throwNPE("filteringId"); 2593 2594 this.key = key; 2595 this.value = value; 2596 this.filteringId = filteringId; 2597 } 2598 2599 /** 2600 * JSON Object Constructor 2601 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableValueDictEntry'}. 2602 */ 2603 public AttributionReportingAggregatableValueDictEntry (JsonObject jo) 2604 { 2605 this.key = ReadJSON.getString(jo, "key", false, true); 2606 this.value = ReadNumberJSON.get(jo, "value", false, true); 2607 this.filteringId = ReadJSON.getString(jo, "filteringId", false, true); 2608 } 2609 2610 2611 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2612 public boolean equals(Object other) 2613 { 2614 if (this == other) return true; 2615 if (other == null) return false; 2616 if (other.getClass() != this.getClass()) return false; 2617 2618 AttributionReportingAggregatableValueDictEntry o = (AttributionReportingAggregatableValueDictEntry) other; 2619 2620 return 2621 Objects.equals(this.key, o.key) 2622 && Objects.equals(this.value, o.value) 2623 && Objects.equals(this.filteringId, o.filteringId); 2624 } 2625 2626 /** Generates a Hash-Code for {@code 'this'} instance */ 2627 public int hashCode() 2628 { 2629 return 2630 Objects.hashCode(this.key) 2631 + Objects.hashCode(this.value) 2632 + Objects.hashCode(this.filteringId); 2633 } 2634 } 2635 2636 /** 2637 * <CODE>[No Description Provided by Google]</CODE> 2638 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2639 */ 2640 public static class AttributionReportingAggregatableValueEntry 2641 extends BaseType 2642 implements java.io.Serializable 2643 { 2644 /** For Object Serialization. java.io.Serializable */ 2645 protected static final long serialVersionUID = 1; 2646 2647 public boolean[] optionals() 2648 { return new boolean[] { false, false, }; } 2649 2650 /** <CODE>[No Description Provided by Google]</CODE> */ 2651 public final Storage.AttributionReportingAggregatableValueDictEntry[] values; 2652 2653 /** <CODE>[No Description Provided by Google]</CODE> */ 2654 public final Storage.AttributionReportingFilterPair filters; 2655 2656 /** 2657 * Constructor 2658 * 2659 * @param values - 2660 * 2661 * @param filters - 2662 */ 2663 public AttributionReportingAggregatableValueEntry( 2664 Storage.AttributionReportingAggregatableValueDictEntry[] values, 2665 Storage.AttributionReportingFilterPair filters 2666 ) 2667 { 2668 // Exception-Check(s) to ensure that if any parameters which are not declared as 2669 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2670 2671 if (values == null) THROWS.throwNPE("values"); 2672 if (filters == null) THROWS.throwNPE("filters"); 2673 2674 this.values = values; 2675 this.filters = filters; 2676 } 2677 2678 /** 2679 * JSON Object Constructor 2680 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableValueEntry'}. 2681 */ 2682 public AttributionReportingAggregatableValueEntry (JsonObject jo) 2683 { 2684 this.values = (jo.getJsonArray("values") == null) 2685 ? null 2686 : RJArrIntoStream.objArr(jo.getJsonArray("values"), null, 0, Storage.AttributionReportingAggregatableValueDictEntry.class).toArray(Storage.AttributionReportingAggregatableValueDictEntry[]::new); 2687 2688 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 2689 } 2690 2691 2692 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2693 public boolean equals(Object other) 2694 { 2695 if (this == other) return true; 2696 if (other == null) return false; 2697 if (other.getClass() != this.getClass()) return false; 2698 2699 AttributionReportingAggregatableValueEntry o = (AttributionReportingAggregatableValueEntry) other; 2700 2701 return 2702 Arrays.deepEquals(this.values, o.values) 2703 && Objects.equals(this.filters, o.filters); 2704 } 2705 2706 /** Generates a Hash-Code for {@code 'this'} instance */ 2707 public int hashCode() 2708 { 2709 return 2710 Arrays.deepHashCode(this.values) 2711 + this.filters.hashCode(); 2712 } 2713 } 2714 2715 /** 2716 * <CODE>[No Description Provided by Google]</CODE> 2717 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2718 */ 2719 public static class AttributionReportingEventTriggerData 2720 extends BaseType 2721 implements java.io.Serializable 2722 { 2723 /** For Object Serialization. java.io.Serializable */ 2724 protected static final long serialVersionUID = 1; 2725 2726 public boolean[] optionals() 2727 { return new boolean[] { false, false, true, false, }; } 2728 2729 /** <CODE>[No Description Provided by Google]</CODE> */ 2730 public final String data; 2731 2732 /** <CODE>[No Description Provided by Google]</CODE> */ 2733 public final String priority; 2734 2735 /** 2736 * <CODE>[No Description Provided by Google]</CODE> 2737 * <BR /><B CLASS=Opt>OPTIONAL</B> 2738 */ 2739 public final String dedupKey; 2740 2741 /** <CODE>[No Description Provided by Google]</CODE> */ 2742 public final Storage.AttributionReportingFilterPair filters; 2743 2744 /** 2745 * Constructor 2746 * 2747 * @param data - 2748 * 2749 * @param priority - 2750 * 2751 * @param dedupKey - 2752 * <BR /><B CLASS=Opt>OPTIONAL</B> 2753 * 2754 * @param filters - 2755 */ 2756 public AttributionReportingEventTriggerData( 2757 String data, String priority, String dedupKey, 2758 Storage.AttributionReportingFilterPair filters 2759 ) 2760 { 2761 // Exception-Check(s) to ensure that if any parameters which are not declared as 2762 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2763 2764 if (data == null) THROWS.throwNPE("data"); 2765 if (priority == null) THROWS.throwNPE("priority"); 2766 if (filters == null) THROWS.throwNPE("filters"); 2767 2768 this.data = data; 2769 this.priority = priority; 2770 this.dedupKey = dedupKey; 2771 this.filters = filters; 2772 } 2773 2774 /** 2775 * JSON Object Constructor 2776 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingEventTriggerData'}. 2777 */ 2778 public AttributionReportingEventTriggerData (JsonObject jo) 2779 { 2780 this.data = ReadJSON.getString(jo, "data", false, true); 2781 this.priority = ReadJSON.getString(jo, "priority", false, true); 2782 this.dedupKey = ReadJSON.getString(jo, "dedupKey", true, false); 2783 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 2784 } 2785 2786 2787 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2788 public boolean equals(Object other) 2789 { 2790 if (this == other) return true; 2791 if (other == null) return false; 2792 if (other.getClass() != this.getClass()) return false; 2793 2794 AttributionReportingEventTriggerData o = (AttributionReportingEventTriggerData) other; 2795 2796 return 2797 Objects.equals(this.data, o.data) 2798 && Objects.equals(this.priority, o.priority) 2799 && Objects.equals(this.dedupKey, o.dedupKey) 2800 && Objects.equals(this.filters, o.filters); 2801 } 2802 2803 /** Generates a Hash-Code for {@code 'this'} instance */ 2804 public int hashCode() 2805 { 2806 return 2807 Objects.hashCode(this.data) 2808 + Objects.hashCode(this.priority) 2809 + Objects.hashCode(this.dedupKey) 2810 + this.filters.hashCode(); 2811 } 2812 } 2813 2814 /** 2815 * <CODE>[No Description Provided by Google]</CODE> 2816 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2817 */ 2818 public static class AttributionReportingAggregatableTriggerData 2819 extends BaseType 2820 implements java.io.Serializable 2821 { 2822 /** For Object Serialization. java.io.Serializable */ 2823 protected static final long serialVersionUID = 1; 2824 2825 public boolean[] optionals() 2826 { return new boolean[] { false, false, false, }; } 2827 2828 /** <CODE>[No Description Provided by Google]</CODE> */ 2829 public final String keyPiece; 2830 2831 /** <CODE>[No Description Provided by Google]</CODE> */ 2832 public final String[] sourceKeys; 2833 2834 /** <CODE>[No Description Provided by Google]</CODE> */ 2835 public final Storage.AttributionReportingFilterPair filters; 2836 2837 /** 2838 * Constructor 2839 * 2840 * @param keyPiece - 2841 * 2842 * @param sourceKeys - 2843 * 2844 * @param filters - 2845 */ 2846 public AttributionReportingAggregatableTriggerData 2847 (String keyPiece, String[] sourceKeys, Storage.AttributionReportingFilterPair filters) 2848 { 2849 // Exception-Check(s) to ensure that if any parameters which are not declared as 2850 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2851 2852 if (keyPiece == null) THROWS.throwNPE("keyPiece"); 2853 if (sourceKeys == null) THROWS.throwNPE("sourceKeys"); 2854 if (filters == null) THROWS.throwNPE("filters"); 2855 2856 this.keyPiece = keyPiece; 2857 this.sourceKeys = sourceKeys; 2858 this.filters = filters; 2859 } 2860 2861 /** 2862 * JSON Object Constructor 2863 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableTriggerData'}. 2864 */ 2865 public AttributionReportingAggregatableTriggerData (JsonObject jo) 2866 { 2867 this.keyPiece = ReadJSON.getString(jo, "keyPiece", false, true); 2868 this.sourceKeys = (jo.getJsonArray("sourceKeys") == null) 2869 ? null 2870 : RJArrIntoStream.strArr(jo.getJsonArray("sourceKeys"), null, 0).toArray(String[]::new); 2871 2872 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 2873 } 2874 2875 2876 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2877 public boolean equals(Object other) 2878 { 2879 if (this == other) return true; 2880 if (other == null) return false; 2881 if (other.getClass() != this.getClass()) return false; 2882 2883 AttributionReportingAggregatableTriggerData o = (AttributionReportingAggregatableTriggerData) other; 2884 2885 return 2886 Objects.equals(this.keyPiece, o.keyPiece) 2887 && Arrays.deepEquals(this.sourceKeys, o.sourceKeys) 2888 && Objects.equals(this.filters, o.filters); 2889 } 2890 2891 /** Generates a Hash-Code for {@code 'this'} instance */ 2892 public int hashCode() 2893 { 2894 return 2895 Objects.hashCode(this.keyPiece) 2896 + Arrays.deepHashCode(this.sourceKeys) 2897 + this.filters.hashCode(); 2898 } 2899 } 2900 2901 /** 2902 * <CODE>[No Description Provided by Google]</CODE> 2903 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2904 */ 2905 public static class AttributionReportingAggregatableDedupKey 2906 extends BaseType 2907 implements java.io.Serializable 2908 { 2909 /** For Object Serialization. java.io.Serializable */ 2910 protected static final long serialVersionUID = 1; 2911 2912 public boolean[] optionals() 2913 { return new boolean[] { true, false, }; } 2914 2915 /** 2916 * <CODE>[No Description Provided by Google]</CODE> 2917 * <BR /><B CLASS=Opt>OPTIONAL</B> 2918 */ 2919 public final String dedupKey; 2920 2921 /** <CODE>[No Description Provided by Google]</CODE> */ 2922 public final Storage.AttributionReportingFilterPair filters; 2923 2924 /** 2925 * Constructor 2926 * 2927 * @param dedupKey - 2928 * <BR /><B CLASS=Opt>OPTIONAL</B> 2929 * 2930 * @param filters - 2931 */ 2932 public AttributionReportingAggregatableDedupKey 2933 (String dedupKey, Storage.AttributionReportingFilterPair filters) 2934 { 2935 // Exception-Check(s) to ensure that if any parameters which are not declared as 2936 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 2937 2938 if (filters == null) THROWS.throwNPE("filters"); 2939 2940 this.dedupKey = dedupKey; 2941 this.filters = filters; 2942 } 2943 2944 /** 2945 * JSON Object Constructor 2946 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingAggregatableDedupKey'}. 2947 */ 2948 public AttributionReportingAggregatableDedupKey (JsonObject jo) 2949 { 2950 this.dedupKey = ReadJSON.getString(jo, "dedupKey", true, false); 2951 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 2952 } 2953 2954 2955 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 2956 public boolean equals(Object other) 2957 { 2958 if (this == other) return true; 2959 if (other == null) return false; 2960 if (other.getClass() != this.getClass()) return false; 2961 2962 AttributionReportingAggregatableDedupKey o = (AttributionReportingAggregatableDedupKey) other; 2963 2964 return 2965 Objects.equals(this.dedupKey, o.dedupKey) 2966 && Objects.equals(this.filters, o.filters); 2967 } 2968 2969 /** Generates a Hash-Code for {@code 'this'} instance */ 2970 public int hashCode() 2971 { 2972 return 2973 Objects.hashCode(this.dedupKey) 2974 + this.filters.hashCode(); 2975 } 2976 } 2977 2978 /** 2979 * <CODE>[No Description Provided by Google]</CODE> 2980 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 2981 */ 2982 public static class AttributionReportingNamedBudgetCandidate 2983 extends BaseType 2984 implements java.io.Serializable 2985 { 2986 /** For Object Serialization. java.io.Serializable */ 2987 protected static final long serialVersionUID = 1; 2988 2989 public boolean[] optionals() 2990 { return new boolean[] { true, false, }; } 2991 2992 /** 2993 * <CODE>[No Description Provided by Google]</CODE> 2994 * <BR /><B CLASS=Opt>OPTIONAL</B> 2995 */ 2996 public final String name; 2997 2998 /** <CODE>[No Description Provided by Google]</CODE> */ 2999 public final Storage.AttributionReportingFilterPair filters; 3000 3001 /** 3002 * Constructor 3003 * 3004 * @param name - 3005 * <BR /><B CLASS=Opt>OPTIONAL</B> 3006 * 3007 * @param filters - 3008 */ 3009 public AttributionReportingNamedBudgetCandidate 3010 (String name, Storage.AttributionReportingFilterPair filters) 3011 { 3012 // Exception-Check(s) to ensure that if any parameters which are not declared as 3013 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3014 3015 if (filters == null) THROWS.throwNPE("filters"); 3016 3017 this.name = name; 3018 this.filters = filters; 3019 } 3020 3021 /** 3022 * JSON Object Constructor 3023 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingNamedBudgetCandidate'}. 3024 */ 3025 public AttributionReportingNamedBudgetCandidate (JsonObject jo) 3026 { 3027 this.name = ReadJSON.getString(jo, "name", true, false); 3028 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 3029 } 3030 3031 3032 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3033 public boolean equals(Object other) 3034 { 3035 if (this == other) return true; 3036 if (other == null) return false; 3037 if (other.getClass() != this.getClass()) return false; 3038 3039 AttributionReportingNamedBudgetCandidate o = (AttributionReportingNamedBudgetCandidate) other; 3040 3041 return 3042 Objects.equals(this.name, o.name) 3043 && Objects.equals(this.filters, o.filters); 3044 } 3045 3046 /** Generates a Hash-Code for {@code 'this'} instance */ 3047 public int hashCode() 3048 { 3049 return 3050 Objects.hashCode(this.name) 3051 + this.filters.hashCode(); 3052 } 3053 } 3054 3055 /** 3056 * <CODE>[No Description Provided by Google]</CODE> 3057 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 3058 */ 3059 public static class AttributionReportingTriggerRegistration 3060 extends BaseType 3061 implements java.io.Serializable 3062 { 3063 /** For Object Serialization. java.io.Serializable */ 3064 protected static final long serialVersionUID = 1; 3065 3066 public boolean[] optionals() 3067 { return new boolean[] { false, true, false, false, false, false, false, false, true, false, true, false, false, false, }; } 3068 3069 /** <CODE>[No Description Provided by Google]</CODE> */ 3070 public final Storage.AttributionReportingFilterPair filters; 3071 3072 /** 3073 * <CODE>[No Description Provided by Google]</CODE> 3074 * <BR /><B CLASS=Opt>OPTIONAL</B> 3075 */ 3076 public final String debugKey; 3077 3078 /** <CODE>[No Description Provided by Google]</CODE> */ 3079 public final Storage.AttributionReportingAggregatableDedupKey[] aggregatableDedupKeys; 3080 3081 /** <CODE>[No Description Provided by Google]</CODE> */ 3082 public final Storage.AttributionReportingEventTriggerData[] eventTriggerData; 3083 3084 /** <CODE>[No Description Provided by Google]</CODE> */ 3085 public final Storage.AttributionReportingAggregatableTriggerData[] aggregatableTriggerData; 3086 3087 /** <CODE>[No Description Provided by Google]</CODE> */ 3088 public final Storage.AttributionReportingAggregatableValueEntry[] aggregatableValues; 3089 3090 /** <CODE>[No Description Provided by Google]</CODE> */ 3091 public final int aggregatableFilteringIdMaxBytes; 3092 3093 /** <CODE>[No Description Provided by Google]</CODE> */ 3094 public final boolean debugReporting; 3095 3096 /** 3097 * <CODE>[No Description Provided by Google]</CODE> 3098 * <BR /><B CLASS=Opt>OPTIONAL</B> 3099 */ 3100 public final String aggregationCoordinatorOrigin; 3101 3102 /** <CODE>[No Description Provided by Google]</CODE> */ 3103 public final String sourceRegistrationTimeConfig; 3104 3105 /** 3106 * <CODE>[No Description Provided by Google]</CODE> 3107 * <BR /><B CLASS=Opt>OPTIONAL</B> 3108 */ 3109 public final String triggerContextId; 3110 3111 /** <CODE>[No Description Provided by Google]</CODE> */ 3112 public final Storage.AttributionReportingAggregatableDebugReportingConfig aggregatableDebugReportingConfig; 3113 3114 /** <CODE>[No Description Provided by Google]</CODE> */ 3115 public final String[] scopes; 3116 3117 /** <CODE>[No Description Provided by Google]</CODE> */ 3118 public final Storage.AttributionReportingNamedBudgetCandidate[] namedBudgets; 3119 3120 /** 3121 * Constructor 3122 * 3123 * @param filters - 3124 * 3125 * @param debugKey - 3126 * <BR /><B CLASS=Opt>OPTIONAL</B> 3127 * 3128 * @param aggregatableDedupKeys - 3129 * 3130 * @param eventTriggerData - 3131 * 3132 * @param aggregatableTriggerData - 3133 * 3134 * @param aggregatableValues - 3135 * 3136 * @param aggregatableFilteringIdMaxBytes - 3137 * 3138 * @param debugReporting - 3139 * 3140 * @param aggregationCoordinatorOrigin - 3141 * <BR /><B CLASS=Opt>OPTIONAL</B> 3142 * 3143 * @param sourceRegistrationTimeConfig - 3144 * 3145 * @param triggerContextId - 3146 * <BR /><B CLASS=Opt>OPTIONAL</B> 3147 * 3148 * @param aggregatableDebugReportingConfig - 3149 * 3150 * @param scopes - 3151 * 3152 * @param namedBudgets - 3153 */ 3154 public AttributionReportingTriggerRegistration( 3155 Storage.AttributionReportingFilterPair filters, String debugKey, 3156 Storage.AttributionReportingAggregatableDedupKey[] aggregatableDedupKeys, 3157 Storage.AttributionReportingEventTriggerData[] eventTriggerData, 3158 Storage.AttributionReportingAggregatableTriggerData[] aggregatableTriggerData, 3159 Storage.AttributionReportingAggregatableValueEntry[] aggregatableValues, 3160 int aggregatableFilteringIdMaxBytes, boolean debugReporting, 3161 String aggregationCoordinatorOrigin, String sourceRegistrationTimeConfig, 3162 String triggerContextId, 3163 Storage.AttributionReportingAggregatableDebugReportingConfig aggregatableDebugReportingConfig, 3164 String[] scopes, Storage.AttributionReportingNamedBudgetCandidate[] namedBudgets 3165 ) 3166 { 3167 // Exception-Check(s) to ensure that if any parameters which are not declared as 3168 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3169 3170 if (filters == null) THROWS.throwNPE("filters"); 3171 if (aggregatableDedupKeys == null) THROWS.throwNPE("aggregatableDedupKeys"); 3172 if (eventTriggerData == null) THROWS.throwNPE("eventTriggerData"); 3173 if (aggregatableTriggerData == null) THROWS.throwNPE("aggregatableTriggerData"); 3174 if (aggregatableValues == null) THROWS.throwNPE("aggregatableValues"); 3175 if (sourceRegistrationTimeConfig == null) THROWS.throwNPE("sourceRegistrationTimeConfig"); 3176 if (aggregatableDebugReportingConfig == null) THROWS.throwNPE("aggregatableDebugReportingConfig"); 3177 if (scopes == null) THROWS.throwNPE("scopes"); 3178 if (namedBudgets == null) THROWS.throwNPE("namedBudgets"); 3179 3180 // Exception-Check(s) to ensure that if any parameters which must adhere to a 3181 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 3182 3183 THROWS.checkIAE("sourceRegistrationTimeConfig", sourceRegistrationTimeConfig, "Storage.AttributionReportingSourceRegistrationTimeConfig", Storage.AttributionReportingSourceRegistrationTimeConfig); 3184 3185 this.filters = filters; 3186 this.debugKey = debugKey; 3187 this.aggregatableDedupKeys = aggregatableDedupKeys; 3188 this.eventTriggerData = eventTriggerData; 3189 this.aggregatableTriggerData = aggregatableTriggerData; 3190 this.aggregatableValues = aggregatableValues; 3191 this.aggregatableFilteringIdMaxBytes = aggregatableFilteringIdMaxBytes; 3192 this.debugReporting = debugReporting; 3193 this.aggregationCoordinatorOrigin = aggregationCoordinatorOrigin; 3194 this.sourceRegistrationTimeConfig = sourceRegistrationTimeConfig; 3195 this.triggerContextId = triggerContextId; 3196 this.aggregatableDebugReportingConfig = aggregatableDebugReportingConfig; 3197 this.scopes = scopes; 3198 this.namedBudgets = namedBudgets; 3199 } 3200 3201 /** 3202 * JSON Object Constructor 3203 * @param jo A Json-Object having data about an instance of {@code 'AttributionReportingTriggerRegistration'}. 3204 */ 3205 public AttributionReportingTriggerRegistration (JsonObject jo) 3206 { 3207 this.filters = ReadJSON.getObject(jo, "filters", Storage.AttributionReportingFilterPair.class, false, true); 3208 this.debugKey = ReadJSON.getString(jo, "debugKey", true, false); 3209 this.aggregatableDedupKeys = (jo.getJsonArray("aggregatableDedupKeys") == null) 3210 ? null 3211 : RJArrIntoStream.objArr(jo.getJsonArray("aggregatableDedupKeys"), null, 0, Storage.AttributionReportingAggregatableDedupKey.class).toArray(Storage.AttributionReportingAggregatableDedupKey[]::new); 3212 3213 this.eventTriggerData = (jo.getJsonArray("eventTriggerData") == null) 3214 ? null 3215 : RJArrIntoStream.objArr(jo.getJsonArray("eventTriggerData"), null, 0, Storage.AttributionReportingEventTriggerData.class).toArray(Storage.AttributionReportingEventTriggerData[]::new); 3216 3217 this.aggregatableTriggerData = (jo.getJsonArray("aggregatableTriggerData") == null) 3218 ? null 3219 : RJArrIntoStream.objArr(jo.getJsonArray("aggregatableTriggerData"), null, 0, Storage.AttributionReportingAggregatableTriggerData.class).toArray(Storage.AttributionReportingAggregatableTriggerData[]::new); 3220 3221 this.aggregatableValues = (jo.getJsonArray("aggregatableValues") == null) 3222 ? null 3223 : RJArrIntoStream.objArr(jo.getJsonArray("aggregatableValues"), null, 0, Storage.AttributionReportingAggregatableValueEntry.class).toArray(Storage.AttributionReportingAggregatableValueEntry[]::new); 3224 3225 this.aggregatableFilteringIdMaxBytes = ReadPrimJSON.getInt(jo, "aggregatableFilteringIdMaxBytes"); 3226 this.debugReporting = ReadPrimJSON.getBoolean(jo, "debugReporting"); 3227 this.aggregationCoordinatorOrigin = ReadJSON.getString(jo, "aggregationCoordinatorOrigin", true, false); 3228 this.sourceRegistrationTimeConfig = ReadJSON.getString(jo, "sourceRegistrationTimeConfig", false, true); 3229 this.triggerContextId = ReadJSON.getString(jo, "triggerContextId", true, false); 3230 this.aggregatableDebugReportingConfig = ReadJSON.getObject(jo, "aggregatableDebugReportingConfig", Storage.AttributionReportingAggregatableDebugReportingConfig.class, false, true); 3231 this.scopes = (jo.getJsonArray("scopes") == null) 3232 ? null 3233 : RJArrIntoStream.strArr(jo.getJsonArray("scopes"), null, 0).toArray(String[]::new); 3234 3235 this.namedBudgets = (jo.getJsonArray("namedBudgets") == null) 3236 ? null 3237 : RJArrIntoStream.objArr(jo.getJsonArray("namedBudgets"), null, 0, Storage.AttributionReportingNamedBudgetCandidate.class).toArray(Storage.AttributionReportingNamedBudgetCandidate[]::new); 3238 3239 } 3240 3241 3242 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3243 public boolean equals(Object other) 3244 { 3245 if (this == other) return true; 3246 if (other == null) return false; 3247 if (other.getClass() != this.getClass()) return false; 3248 3249 AttributionReportingTriggerRegistration o = (AttributionReportingTriggerRegistration) other; 3250 3251 return 3252 Objects.equals(this.filters, o.filters) 3253 && Objects.equals(this.debugKey, o.debugKey) 3254 && Arrays.deepEquals(this.aggregatableDedupKeys, o.aggregatableDedupKeys) 3255 && Arrays.deepEquals(this.eventTriggerData, o.eventTriggerData) 3256 && Arrays.deepEquals(this.aggregatableTriggerData, o.aggregatableTriggerData) 3257 && Arrays.deepEquals(this.aggregatableValues, o.aggregatableValues) 3258 && (this.aggregatableFilteringIdMaxBytes == o.aggregatableFilteringIdMaxBytes) 3259 && (this.debugReporting == o.debugReporting) 3260 && Objects.equals(this.aggregationCoordinatorOrigin, o.aggregationCoordinatorOrigin) 3261 && Objects.equals(this.sourceRegistrationTimeConfig, o.sourceRegistrationTimeConfig) 3262 && Objects.equals(this.triggerContextId, o.triggerContextId) 3263 && Objects.equals(this.aggregatableDebugReportingConfig, o.aggregatableDebugReportingConfig) 3264 && Arrays.deepEquals(this.scopes, o.scopes) 3265 && Arrays.deepEquals(this.namedBudgets, o.namedBudgets); 3266 } 3267 3268 /** Generates a Hash-Code for {@code 'this'} instance */ 3269 public int hashCode() 3270 { 3271 return 3272 this.filters.hashCode() 3273 + Objects.hashCode(this.debugKey) 3274 + Arrays.deepHashCode(this.aggregatableDedupKeys) 3275 + Arrays.deepHashCode(this.eventTriggerData) 3276 + Arrays.deepHashCode(this.aggregatableTriggerData) 3277 + Arrays.deepHashCode(this.aggregatableValues) 3278 + this.aggregatableFilteringIdMaxBytes 3279 + (this.debugReporting ? 1 : 0) 3280 + Objects.hashCode(this.aggregationCoordinatorOrigin) 3281 + Objects.hashCode(this.sourceRegistrationTimeConfig) 3282 + Objects.hashCode(this.triggerContextId) 3283 + this.aggregatableDebugReportingConfig.hashCode() 3284 + Arrays.deepHashCode(this.scopes) 3285 + Arrays.deepHashCode(this.namedBudgets); 3286 } 3287 } 3288 3289 /** 3290 * A single Related Website Set object. 3291 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 3292 */ 3293 public static class RelatedWebsiteSet 3294 extends BaseType 3295 implements java.io.Serializable 3296 { 3297 /** For Object Serialization. java.io.Serializable */ 3298 protected static final long serialVersionUID = 1; 3299 3300 public boolean[] optionals() 3301 { return new boolean[] { false, false, false, }; } 3302 3303 /** The primary site of this set, along with the ccTLDs if there is any. */ 3304 public final String[] primarySites; 3305 3306 /** The associated sites of this set, along with the ccTLDs if there is any. */ 3307 public final String[] associatedSites; 3308 3309 /** The service sites of this set, along with the ccTLDs if there is any. */ 3310 public final String[] serviceSites; 3311 3312 /** 3313 * Constructor 3314 * 3315 * @param primarySites The primary site of this set, along with the ccTLDs if there is any. 3316 * 3317 * @param associatedSites The associated sites of this set, along with the ccTLDs if there is any. 3318 * 3319 * @param serviceSites The service sites of this set, along with the ccTLDs if there is any. 3320 */ 3321 public RelatedWebsiteSet 3322 (String[] primarySites, String[] associatedSites, String[] serviceSites) 3323 { 3324 // Exception-Check(s) to ensure that if any parameters which are not declared as 3325 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3326 3327 if (primarySites == null) THROWS.throwNPE("primarySites"); 3328 if (associatedSites == null) THROWS.throwNPE("associatedSites"); 3329 if (serviceSites == null) THROWS.throwNPE("serviceSites"); 3330 3331 this.primarySites = primarySites; 3332 this.associatedSites = associatedSites; 3333 this.serviceSites = serviceSites; 3334 } 3335 3336 /** 3337 * JSON Object Constructor 3338 * @param jo A Json-Object having data about an instance of {@code 'RelatedWebsiteSet'}. 3339 */ 3340 public RelatedWebsiteSet (JsonObject jo) 3341 { 3342 this.primarySites = (jo.getJsonArray("primarySites") == null) 3343 ? null 3344 : RJArrIntoStream.strArr(jo.getJsonArray("primarySites"), null, 0).toArray(String[]::new); 3345 3346 this.associatedSites = (jo.getJsonArray("associatedSites") == null) 3347 ? null 3348 : RJArrIntoStream.strArr(jo.getJsonArray("associatedSites"), null, 0).toArray(String[]::new); 3349 3350 this.serviceSites = (jo.getJsonArray("serviceSites") == null) 3351 ? null 3352 : RJArrIntoStream.strArr(jo.getJsonArray("serviceSites"), null, 0).toArray(String[]::new); 3353 3354 } 3355 3356 3357 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3358 public boolean equals(Object other) 3359 { 3360 if (this == other) return true; 3361 if (other == null) return false; 3362 if (other.getClass() != this.getClass()) return false; 3363 3364 RelatedWebsiteSet o = (RelatedWebsiteSet) other; 3365 3366 return 3367 Arrays.deepEquals(this.primarySites, o.primarySites) 3368 && Arrays.deepEquals(this.associatedSites, o.associatedSites) 3369 && Arrays.deepEquals(this.serviceSites, o.serviceSites); 3370 } 3371 3372 /** Generates a Hash-Code for {@code 'this'} instance */ 3373 public int hashCode() 3374 { 3375 return 3376 Arrays.deepHashCode(this.primarySites) 3377 + Arrays.deepHashCode(this.associatedSites) 3378 + Arrays.deepHashCode(this.serviceSites); 3379 } 3380 } 3381 3382 /** A cache's contents have been modified. */ 3383 public static class cacheStorageContentUpdated 3384 extends BrowserEvent 3385 implements java.io.Serializable 3386 { 3387 /** For Object Serialization. java.io.Serializable */ 3388 protected static final long serialVersionUID = 1; 3389 3390 public boolean[] optionals() 3391 { return new boolean[] { false, false, false, false, }; } 3392 3393 /** Origin to update. */ 3394 public final String origin; 3395 3396 /** Storage key to update. */ 3397 public final String storageKey; 3398 3399 /** Storage bucket to update. */ 3400 public final String bucketId; 3401 3402 /** Name of cache in origin. */ 3403 public final String cacheName; 3404 3405 /** 3406 * Constructor 3407 * 3408 * @param origin Origin to update. 3409 * 3410 * @param storageKey Storage key to update. 3411 * 3412 * @param bucketId Storage bucket to update. 3413 * 3414 * @param cacheName Name of cache in origin. 3415 */ 3416 public cacheStorageContentUpdated 3417 (String origin, String storageKey, String bucketId, String cacheName) 3418 { 3419 super("Storage", "cacheStorageContentUpdated", 4); 3420 3421 // Exception-Check(s) to ensure that if any parameters which are not declared as 3422 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3423 3424 if (origin == null) THROWS.throwNPE("origin"); 3425 if (storageKey == null) THROWS.throwNPE("storageKey"); 3426 if (bucketId == null) THROWS.throwNPE("bucketId"); 3427 if (cacheName == null) THROWS.throwNPE("cacheName"); 3428 3429 this.origin = origin; 3430 this.storageKey = storageKey; 3431 this.bucketId = bucketId; 3432 this.cacheName = cacheName; 3433 } 3434 3435 /** 3436 * JSON Object Constructor 3437 * @param jo A Json-Object having data about an instance of {@code 'cacheStorageContentUpdated'}. 3438 */ 3439 public cacheStorageContentUpdated (JsonObject jo) 3440 { 3441 super("Storage", "cacheStorageContentUpdated", 4); 3442 3443 this.origin = ReadJSON.getString(jo, "origin", false, true); 3444 this.storageKey = ReadJSON.getString(jo, "storageKey", false, true); 3445 this.bucketId = ReadJSON.getString(jo, "bucketId", false, true); 3446 this.cacheName = ReadJSON.getString(jo, "cacheName", false, true); 3447 } 3448 3449 3450 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3451 public boolean equals(Object other) 3452 { 3453 if (this == other) return true; 3454 if (other == null) return false; 3455 if (other.getClass() != this.getClass()) return false; 3456 3457 cacheStorageContentUpdated o = (cacheStorageContentUpdated) other; 3458 3459 return 3460 Objects.equals(this.origin, o.origin) 3461 && Objects.equals(this.storageKey, o.storageKey) 3462 && Objects.equals(this.bucketId, o.bucketId) 3463 && Objects.equals(this.cacheName, o.cacheName); 3464 } 3465 3466 /** Generates a Hash-Code for {@code 'this'} instance */ 3467 public int hashCode() 3468 { 3469 return 3470 Objects.hashCode(this.origin) 3471 + Objects.hashCode(this.storageKey) 3472 + Objects.hashCode(this.bucketId) 3473 + Objects.hashCode(this.cacheName); 3474 } 3475 } 3476 3477 /** A cache has been added/deleted. */ 3478 public static class cacheStorageListUpdated 3479 extends BrowserEvent 3480 implements java.io.Serializable 3481 { 3482 /** For Object Serialization. java.io.Serializable */ 3483 protected static final long serialVersionUID = 1; 3484 3485 public boolean[] optionals() 3486 { return new boolean[] { false, false, false, }; } 3487 3488 /** Origin to update. */ 3489 public final String origin; 3490 3491 /** Storage key to update. */ 3492 public final String storageKey; 3493 3494 /** Storage bucket to update. */ 3495 public final String bucketId; 3496 3497 /** 3498 * Constructor 3499 * 3500 * @param origin Origin to update. 3501 * 3502 * @param storageKey Storage key to update. 3503 * 3504 * @param bucketId Storage bucket to update. 3505 */ 3506 public cacheStorageListUpdated(String origin, String storageKey, String bucketId) 3507 { 3508 super("Storage", "cacheStorageListUpdated", 3); 3509 3510 // Exception-Check(s) to ensure that if any parameters which are not declared as 3511 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3512 3513 if (origin == null) THROWS.throwNPE("origin"); 3514 if (storageKey == null) THROWS.throwNPE("storageKey"); 3515 if (bucketId == null) THROWS.throwNPE("bucketId"); 3516 3517 this.origin = origin; 3518 this.storageKey = storageKey; 3519 this.bucketId = bucketId; 3520 } 3521 3522 /** 3523 * JSON Object Constructor 3524 * @param jo A Json-Object having data about an instance of {@code 'cacheStorageListUpdated'}. 3525 */ 3526 public cacheStorageListUpdated (JsonObject jo) 3527 { 3528 super("Storage", "cacheStorageListUpdated", 3); 3529 3530 this.origin = ReadJSON.getString(jo, "origin", false, true); 3531 this.storageKey = ReadJSON.getString(jo, "storageKey", false, true); 3532 this.bucketId = ReadJSON.getString(jo, "bucketId", false, true); 3533 } 3534 3535 3536 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3537 public boolean equals(Object other) 3538 { 3539 if (this == other) return true; 3540 if (other == null) return false; 3541 if (other.getClass() != this.getClass()) return false; 3542 3543 cacheStorageListUpdated o = (cacheStorageListUpdated) other; 3544 3545 return 3546 Objects.equals(this.origin, o.origin) 3547 && Objects.equals(this.storageKey, o.storageKey) 3548 && Objects.equals(this.bucketId, o.bucketId); 3549 } 3550 3551 /** Generates a Hash-Code for {@code 'this'} instance */ 3552 public int hashCode() 3553 { 3554 return 3555 Objects.hashCode(this.origin) 3556 + Objects.hashCode(this.storageKey) 3557 + Objects.hashCode(this.bucketId); 3558 } 3559 } 3560 3561 /** The origin's IndexedDB object store has been modified. */ 3562 public static class indexedDBContentUpdated 3563 extends BrowserEvent 3564 implements java.io.Serializable 3565 { 3566 /** For Object Serialization. java.io.Serializable */ 3567 protected static final long serialVersionUID = 1; 3568 3569 public boolean[] optionals() 3570 { return new boolean[] { false, false, false, false, false, }; } 3571 3572 /** Origin to update. */ 3573 public final String origin; 3574 3575 /** Storage key to update. */ 3576 public final String storageKey; 3577 3578 /** Storage bucket to update. */ 3579 public final String bucketId; 3580 3581 /** Database to update. */ 3582 public final String databaseName; 3583 3584 /** ObjectStore to update. */ 3585 public final String objectStoreName; 3586 3587 /** 3588 * Constructor 3589 * 3590 * @param origin Origin to update. 3591 * 3592 * @param storageKey Storage key to update. 3593 * 3594 * @param bucketId Storage bucket to update. 3595 * 3596 * @param databaseName Database to update. 3597 * 3598 * @param objectStoreName ObjectStore to update. 3599 */ 3600 public indexedDBContentUpdated( 3601 String origin, String storageKey, String bucketId, String databaseName, 3602 String objectStoreName 3603 ) 3604 { 3605 super("Storage", "indexedDBContentUpdated", 5); 3606 3607 // Exception-Check(s) to ensure that if any parameters which are not declared as 3608 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3609 3610 if (origin == null) THROWS.throwNPE("origin"); 3611 if (storageKey == null) THROWS.throwNPE("storageKey"); 3612 if (bucketId == null) THROWS.throwNPE("bucketId"); 3613 if (databaseName == null) THROWS.throwNPE("databaseName"); 3614 if (objectStoreName == null) THROWS.throwNPE("objectStoreName"); 3615 3616 this.origin = origin; 3617 this.storageKey = storageKey; 3618 this.bucketId = bucketId; 3619 this.databaseName = databaseName; 3620 this.objectStoreName = objectStoreName; 3621 } 3622 3623 /** 3624 * JSON Object Constructor 3625 * @param jo A Json-Object having data about an instance of {@code 'indexedDBContentUpdated'}. 3626 */ 3627 public indexedDBContentUpdated (JsonObject jo) 3628 { 3629 super("Storage", "indexedDBContentUpdated", 5); 3630 3631 this.origin = ReadJSON.getString(jo, "origin", false, true); 3632 this.storageKey = ReadJSON.getString(jo, "storageKey", false, true); 3633 this.bucketId = ReadJSON.getString(jo, "bucketId", false, true); 3634 this.databaseName = ReadJSON.getString(jo, "databaseName", false, true); 3635 this.objectStoreName = ReadJSON.getString(jo, "objectStoreName", false, true); 3636 } 3637 3638 3639 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3640 public boolean equals(Object other) 3641 { 3642 if (this == other) return true; 3643 if (other == null) return false; 3644 if (other.getClass() != this.getClass()) return false; 3645 3646 indexedDBContentUpdated o = (indexedDBContentUpdated) other; 3647 3648 return 3649 Objects.equals(this.origin, o.origin) 3650 && Objects.equals(this.storageKey, o.storageKey) 3651 && Objects.equals(this.bucketId, o.bucketId) 3652 && Objects.equals(this.databaseName, o.databaseName) 3653 && Objects.equals(this.objectStoreName, o.objectStoreName); 3654 } 3655 3656 /** Generates a Hash-Code for {@code 'this'} instance */ 3657 public int hashCode() 3658 { 3659 return 3660 Objects.hashCode(this.origin) 3661 + Objects.hashCode(this.storageKey) 3662 + Objects.hashCode(this.bucketId) 3663 + Objects.hashCode(this.databaseName) 3664 + Objects.hashCode(this.objectStoreName); 3665 } 3666 } 3667 3668 /** The origin's IndexedDB database list has been modified. */ 3669 public static class indexedDBListUpdated 3670 extends BrowserEvent 3671 implements java.io.Serializable 3672 { 3673 /** For Object Serialization. java.io.Serializable */ 3674 protected static final long serialVersionUID = 1; 3675 3676 public boolean[] optionals() 3677 { return new boolean[] { false, false, false, }; } 3678 3679 /** Origin to update. */ 3680 public final String origin; 3681 3682 /** Storage key to update. */ 3683 public final String storageKey; 3684 3685 /** Storage bucket to update. */ 3686 public final String bucketId; 3687 3688 /** 3689 * Constructor 3690 * 3691 * @param origin Origin to update. 3692 * 3693 * @param storageKey Storage key to update. 3694 * 3695 * @param bucketId Storage bucket to update. 3696 */ 3697 public indexedDBListUpdated(String origin, String storageKey, String bucketId) 3698 { 3699 super("Storage", "indexedDBListUpdated", 3); 3700 3701 // Exception-Check(s) to ensure that if any parameters which are not declared as 3702 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3703 3704 if (origin == null) THROWS.throwNPE("origin"); 3705 if (storageKey == null) THROWS.throwNPE("storageKey"); 3706 if (bucketId == null) THROWS.throwNPE("bucketId"); 3707 3708 this.origin = origin; 3709 this.storageKey = storageKey; 3710 this.bucketId = bucketId; 3711 } 3712 3713 /** 3714 * JSON Object Constructor 3715 * @param jo A Json-Object having data about an instance of {@code 'indexedDBListUpdated'}. 3716 */ 3717 public indexedDBListUpdated (JsonObject jo) 3718 { 3719 super("Storage", "indexedDBListUpdated", 3); 3720 3721 this.origin = ReadJSON.getString(jo, "origin", false, true); 3722 this.storageKey = ReadJSON.getString(jo, "storageKey", false, true); 3723 this.bucketId = ReadJSON.getString(jo, "bucketId", false, true); 3724 } 3725 3726 3727 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3728 public boolean equals(Object other) 3729 { 3730 if (this == other) return true; 3731 if (other == null) return false; 3732 if (other.getClass() != this.getClass()) return false; 3733 3734 indexedDBListUpdated o = (indexedDBListUpdated) other; 3735 3736 return 3737 Objects.equals(this.origin, o.origin) 3738 && Objects.equals(this.storageKey, o.storageKey) 3739 && Objects.equals(this.bucketId, o.bucketId); 3740 } 3741 3742 /** Generates a Hash-Code for {@code 'this'} instance */ 3743 public int hashCode() 3744 { 3745 return 3746 Objects.hashCode(this.origin) 3747 + Objects.hashCode(this.storageKey) 3748 + Objects.hashCode(this.bucketId); 3749 } 3750 } 3751 3752 /** 3753 * One of the interest groups was accessed. Note that these events are global 3754 * to all targets sharing an interest group store. 3755 */ 3756 public static class interestGroupAccessed 3757 extends BrowserEvent 3758 implements java.io.Serializable 3759 { 3760 /** For Object Serialization. java.io.Serializable */ 3761 protected static final long serialVersionUID = 1; 3762 3763 public boolean[] optionals() 3764 { return new boolean[] { false, false, false, false, true, true, true, true, }; } 3765 3766 /** <CODE>[No Description Provided by Google]</CODE> */ 3767 public final Number accessTime; 3768 3769 /** <CODE>[No Description Provided by Google]</CODE> */ 3770 public final String type; 3771 3772 /** <CODE>[No Description Provided by Google]</CODE> */ 3773 public final String ownerOrigin; 3774 3775 /** <CODE>[No Description Provided by Google]</CODE> */ 3776 public final String name; 3777 3778 /** 3779 * For topLevelBid/topLevelAdditionalBid, and when appropriate, 3780 * win and additionalBidWin 3781 * <BR /><B CLASS=Opt>OPTIONAL</B> 3782 */ 3783 public final String componentSellerOrigin; 3784 3785 /** 3786 * For bid or somethingBid event, if done locally and not on a server. 3787 * <BR /><B CLASS=Opt>OPTIONAL</B> 3788 */ 3789 public final Number bid; 3790 3791 /** 3792 * <CODE>[No Description Provided by Google]</CODE> 3793 * <BR /><B CLASS=Opt>OPTIONAL</B> 3794 */ 3795 public final String bidCurrency; 3796 3797 /** 3798 * For non-global events --- links to interestGroupAuctionEvent 3799 * <BR /><B CLASS=Opt>OPTIONAL</B> 3800 */ 3801 public final String uniqueAuctionId; 3802 3803 /** 3804 * Constructor 3805 * 3806 * @param accessTime - 3807 * 3808 * @param type - 3809 * 3810 * @param ownerOrigin - 3811 * 3812 * @param name - 3813 * 3814 * @param componentSellerOrigin 3815 * For topLevelBid/topLevelAdditionalBid, and when appropriate, 3816 * win and additionalBidWin 3817 * <BR /><B CLASS=Opt>OPTIONAL</B> 3818 * 3819 * @param bid For bid or somethingBid event, if done locally and not on a server. 3820 * <BR /><B CLASS=Opt>OPTIONAL</B> 3821 * 3822 * @param bidCurrency - 3823 * <BR /><B CLASS=Opt>OPTIONAL</B> 3824 * 3825 * @param uniqueAuctionId For non-global events --- links to interestGroupAuctionEvent 3826 * <BR /><B CLASS=Opt>OPTIONAL</B> 3827 */ 3828 public interestGroupAccessed( 3829 Number accessTime, String type, String ownerOrigin, String name, 3830 String componentSellerOrigin, Number bid, String bidCurrency, String uniqueAuctionId 3831 ) 3832 { 3833 super("Storage", "interestGroupAccessed", 8); 3834 3835 // Exception-Check(s) to ensure that if any parameters which are not declared as 3836 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3837 3838 if (accessTime == null) THROWS.throwNPE("accessTime"); 3839 if (type == null) THROWS.throwNPE("type"); 3840 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 3841 if (name == null) THROWS.throwNPE("name"); 3842 3843 // Exception-Check(s) to ensure that if any parameters which must adhere to a 3844 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 3845 3846 THROWS.checkIAE("type", type, "Storage.InterestGroupAccessType", Storage.InterestGroupAccessType); 3847 3848 this.accessTime = accessTime; 3849 this.type = type; 3850 this.ownerOrigin = ownerOrigin; 3851 this.name = name; 3852 this.componentSellerOrigin = componentSellerOrigin; 3853 this.bid = bid; 3854 this.bidCurrency = bidCurrency; 3855 this.uniqueAuctionId = uniqueAuctionId; 3856 } 3857 3858 /** 3859 * JSON Object Constructor 3860 * @param jo A Json-Object having data about an instance of {@code 'interestGroupAccessed'}. 3861 */ 3862 public interestGroupAccessed (JsonObject jo) 3863 { 3864 super("Storage", "interestGroupAccessed", 8); 3865 3866 this.accessTime = ReadNumberJSON.get(jo, "accessTime", false, true); 3867 this.type = ReadJSON.getString(jo, "type", false, true); 3868 this.ownerOrigin = ReadJSON.getString(jo, "ownerOrigin", false, true); 3869 this.name = ReadJSON.getString(jo, "name", false, true); 3870 this.componentSellerOrigin = ReadJSON.getString(jo, "componentSellerOrigin", true, false); 3871 this.bid = ReadNumberJSON.get(jo, "bid", true, false); 3872 this.bidCurrency = ReadJSON.getString(jo, "bidCurrency", true, false); 3873 this.uniqueAuctionId = ReadJSON.getString(jo, "uniqueAuctionId", true, false); 3874 } 3875 3876 3877 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 3878 public boolean equals(Object other) 3879 { 3880 if (this == other) return true; 3881 if (other == null) return false; 3882 if (other.getClass() != this.getClass()) return false; 3883 3884 interestGroupAccessed o = (interestGroupAccessed) other; 3885 3886 return 3887 Objects.equals(this.accessTime, o.accessTime) 3888 && Objects.equals(this.type, o.type) 3889 && Objects.equals(this.ownerOrigin, o.ownerOrigin) 3890 && Objects.equals(this.name, o.name) 3891 && Objects.equals(this.componentSellerOrigin, o.componentSellerOrigin) 3892 && Objects.equals(this.bid, o.bid) 3893 && Objects.equals(this.bidCurrency, o.bidCurrency) 3894 && Objects.equals(this.uniqueAuctionId, o.uniqueAuctionId); 3895 } 3896 3897 /** Generates a Hash-Code for {@code 'this'} instance */ 3898 public int hashCode() 3899 { 3900 return 3901 Objects.hashCode(this.accessTime) 3902 + Objects.hashCode(this.type) 3903 + Objects.hashCode(this.ownerOrigin) 3904 + Objects.hashCode(this.name) 3905 + Objects.hashCode(this.componentSellerOrigin) 3906 + Objects.hashCode(this.bid) 3907 + Objects.hashCode(this.bidCurrency) 3908 + Objects.hashCode(this.uniqueAuctionId); 3909 } 3910 } 3911 3912 /** 3913 * An auction involving interest groups is taking place. These events are 3914 * target-specific. 3915 */ 3916 public static class interestGroupAuctionEventOccurred 3917 extends BrowserEvent 3918 implements java.io.Serializable 3919 { 3920 /** For Object Serialization. java.io.Serializable */ 3921 protected static final long serialVersionUID = 1; 3922 3923 public boolean[] optionals() 3924 { return new boolean[] { false, false, false, true, true, }; } 3925 3926 /** <CODE>[No Description Provided by Google]</CODE> */ 3927 public final Number eventTime; 3928 3929 /** <CODE>[No Description Provided by Google]</CODE> */ 3930 public final String type; 3931 3932 /** <CODE>[No Description Provided by Google]</CODE> */ 3933 public final String uniqueAuctionId; 3934 3935 /** 3936 * Set for child auctions. 3937 * <BR /><B CLASS=Opt>OPTIONAL</B> 3938 */ 3939 public final String parentAuctionId; 3940 3941 /** 3942 * Set for started and configResolved 3943 * <BR /><B CLASS=Opt>OPTIONAL</B> 3944 */ 3945 public final JsonObject auctionConfig; 3946 3947 /** 3948 * Constructor 3949 * 3950 * @param eventTime - 3951 * 3952 * @param type - 3953 * 3954 * @param uniqueAuctionId - 3955 * 3956 * @param parentAuctionId Set for child auctions. 3957 * <BR /><B CLASS=Opt>OPTIONAL</B> 3958 * 3959 * @param auctionConfig Set for started and configResolved 3960 * <BR /><B CLASS=Opt>OPTIONAL</B> 3961 */ 3962 public interestGroupAuctionEventOccurred( 3963 Number eventTime, String type, String uniqueAuctionId, String parentAuctionId, 3964 JsonObject auctionConfig 3965 ) 3966 { 3967 super("Storage", "interestGroupAuctionEventOccurred", 5); 3968 3969 // Exception-Check(s) to ensure that if any parameters which are not declared as 3970 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 3971 3972 if (eventTime == null) THROWS.throwNPE("eventTime"); 3973 if (type == null) THROWS.throwNPE("type"); 3974 if (uniqueAuctionId == null) THROWS.throwNPE("uniqueAuctionId"); 3975 3976 // Exception-Check(s) to ensure that if any parameters which must adhere to a 3977 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 3978 3979 THROWS.checkIAE("type", type, "Storage.InterestGroupAuctionEventType", Storage.InterestGroupAuctionEventType); 3980 3981 this.eventTime = eventTime; 3982 this.type = type; 3983 this.uniqueAuctionId = uniqueAuctionId; 3984 this.parentAuctionId = parentAuctionId; 3985 this.auctionConfig = auctionConfig; 3986 } 3987 3988 /** 3989 * JSON Object Constructor 3990 * @param jo A Json-Object having data about an instance of {@code 'interestGroupAuctionEventOccurred'}. 3991 */ 3992 public interestGroupAuctionEventOccurred (JsonObject jo) 3993 { 3994 super("Storage", "interestGroupAuctionEventOccurred", 5); 3995 3996 this.eventTime = ReadNumberJSON.get(jo, "eventTime", false, true); 3997 this.type = ReadJSON.getString(jo, "type", false, true); 3998 this.uniqueAuctionId = ReadJSON.getString(jo, "uniqueAuctionId", false, true); 3999 this.parentAuctionId = ReadJSON.getString(jo, "parentAuctionId", true, false); 4000 this.auctionConfig = jo.getJsonObject("auctionConfig"); 4001 } 4002 4003 4004 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4005 public boolean equals(Object other) 4006 { 4007 if (this == other) return true; 4008 if (other == null) return false; 4009 if (other.getClass() != this.getClass()) return false; 4010 4011 interestGroupAuctionEventOccurred o = (interestGroupAuctionEventOccurred) other; 4012 4013 return 4014 Objects.equals(this.eventTime, o.eventTime) 4015 && Objects.equals(this.type, o.type) 4016 && Objects.equals(this.uniqueAuctionId, o.uniqueAuctionId) 4017 && Objects.equals(this.parentAuctionId, o.parentAuctionId) 4018 && Objects.equals(this.auctionConfig, o.auctionConfig); 4019 } 4020 4021 /** Generates a Hash-Code for {@code 'this'} instance */ 4022 public int hashCode() 4023 { 4024 return 4025 Objects.hashCode(this.eventTime) 4026 + Objects.hashCode(this.type) 4027 + Objects.hashCode(this.uniqueAuctionId) 4028 + Objects.hashCode(this.parentAuctionId) 4029 + Objects.hashCode(this.auctionConfig); 4030 } 4031 } 4032 4033 /** 4034 * Specifies which auctions a particular network fetch may be related to, and 4035 * in what role. Note that it is not ordered with respect to 4036 * Network.requestWillBeSent (but will happen before loadingFinished 4037 * loadingFailed). 4038 */ 4039 public static class interestGroupAuctionNetworkRequestCreated 4040 extends BrowserEvent 4041 implements java.io.Serializable 4042 { 4043 /** For Object Serialization. java.io.Serializable */ 4044 protected static final long serialVersionUID = 1; 4045 4046 public boolean[] optionals() 4047 { return new boolean[] { false, false, false, }; } 4048 4049 /** <CODE>[No Description Provided by Google]</CODE> */ 4050 public final String type; 4051 4052 /** <CODE>[No Description Provided by Google]</CODE> */ 4053 public final String requestId; 4054 4055 /** 4056 * This is the set of the auctions using the worklet that issued this 4057 * request. In the case of trusted signals, it's possible that only some of 4058 * them actually care about the keys being queried. 4059 */ 4060 public final String[] auctions; 4061 4062 /** 4063 * Constructor 4064 * 4065 * @param type - 4066 * 4067 * @param requestId - 4068 * 4069 * @param auctions 4070 * This is the set of the auctions using the worklet that issued this 4071 * request. In the case of trusted signals, it's possible that only some of 4072 * them actually care about the keys being queried. 4073 */ 4074 public interestGroupAuctionNetworkRequestCreated 4075 (String type, String requestId, String[] auctions) 4076 { 4077 super("Storage", "interestGroupAuctionNetworkRequestCreated", 3); 4078 4079 // Exception-Check(s) to ensure that if any parameters which are not declared as 4080 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4081 4082 if (type == null) THROWS.throwNPE("type"); 4083 if (requestId == null) THROWS.throwNPE("requestId"); 4084 if (auctions == null) THROWS.throwNPE("auctions"); 4085 4086 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4087 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4088 4089 THROWS.checkIAE("type", type, "Storage.InterestGroupAuctionFetchType", Storage.InterestGroupAuctionFetchType); 4090 4091 this.type = type; 4092 this.requestId = requestId; 4093 this.auctions = auctions; 4094 } 4095 4096 /** 4097 * JSON Object Constructor 4098 * @param jo A Json-Object having data about an instance of {@code 'interestGroupAuctionNetworkRequestCreated'}. 4099 */ 4100 public interestGroupAuctionNetworkRequestCreated (JsonObject jo) 4101 { 4102 super("Storage", "interestGroupAuctionNetworkRequestCreated", 3); 4103 4104 this.type = ReadJSON.getString(jo, "type", false, true); 4105 this.requestId = ReadJSON.getString(jo, "requestId", false, true); 4106 this.auctions = (jo.getJsonArray("auctions") == null) 4107 ? null 4108 : RJArrIntoStream.strArr(jo.getJsonArray("auctions"), null, 0).toArray(String[]::new); 4109 4110 } 4111 4112 4113 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4114 public boolean equals(Object other) 4115 { 4116 if (this == other) return true; 4117 if (other == null) return false; 4118 if (other.getClass() != this.getClass()) return false; 4119 4120 interestGroupAuctionNetworkRequestCreated o = (interestGroupAuctionNetworkRequestCreated) other; 4121 4122 return 4123 Objects.equals(this.type, o.type) 4124 && Objects.equals(this.requestId, o.requestId) 4125 && Arrays.deepEquals(this.auctions, o.auctions); 4126 } 4127 4128 /** Generates a Hash-Code for {@code 'this'} instance */ 4129 public int hashCode() 4130 { 4131 return 4132 Objects.hashCode(this.type) 4133 + Objects.hashCode(this.requestId) 4134 + Arrays.deepHashCode(this.auctions); 4135 } 4136 } 4137 4138 /** 4139 * Shared storage was accessed by the associated page. 4140 * The following parameters are included in all events. 4141 */ 4142 public static class sharedStorageAccessed 4143 extends BrowserEvent 4144 implements java.io.Serializable 4145 { 4146 /** For Object Serialization. java.io.Serializable */ 4147 protected static final long serialVersionUID = 1; 4148 4149 public boolean[] optionals() 4150 { return new boolean[] { false, false, false, false, false, false, false, }; } 4151 4152 /** Time of the access. */ 4153 public final Number accessTime; 4154 4155 /** Enum value indicating the access scope. */ 4156 public final String scope; 4157 4158 /** Enum value indicating the Shared Storage API method invoked. */ 4159 public final String method; 4160 4161 /** DevTools Frame Token for the primary frame tree's root. */ 4162 public final String mainFrameId; 4163 4164 /** Serialization of the origin owning the Shared Storage data. */ 4165 public final String ownerOrigin; 4166 4167 /** Serialization of the site owning the Shared Storage data. */ 4168 public final String ownerSite; 4169 4170 /** 4171 * The sub-parameters wrapped by {@code params} are all optional and their 4172 * presence/absence depends on {@code type}. 4173 */ 4174 public final Storage.SharedStorageAccessParams params; 4175 4176 /** 4177 * Constructor 4178 * 4179 * @param accessTime Time of the access. 4180 * 4181 * @param scope Enum value indicating the access scope. 4182 * 4183 * @param method Enum value indicating the Shared Storage API method invoked. 4184 * 4185 * @param mainFrameId DevTools Frame Token for the primary frame tree's root. 4186 * 4187 * @param ownerOrigin Serialization of the origin owning the Shared Storage data. 4188 * 4189 * @param ownerSite Serialization of the site owning the Shared Storage data. 4190 * 4191 * @param params 4192 * The sub-parameters wrapped by {@code params} are all optional and their 4193 * presence/absence depends on {@code type}. 4194 */ 4195 public sharedStorageAccessed( 4196 Number accessTime, String scope, String method, String mainFrameId, 4197 String ownerOrigin, String ownerSite, Storage.SharedStorageAccessParams params 4198 ) 4199 { 4200 super("Storage", "sharedStorageAccessed", 7); 4201 4202 // Exception-Check(s) to ensure that if any parameters which are not declared as 4203 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4204 4205 if (accessTime == null) THROWS.throwNPE("accessTime"); 4206 if (scope == null) THROWS.throwNPE("scope"); 4207 if (method == null) THROWS.throwNPE("method"); 4208 if (mainFrameId == null) THROWS.throwNPE("mainFrameId"); 4209 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 4210 if (ownerSite == null) THROWS.throwNPE("ownerSite"); 4211 if (params == null) THROWS.throwNPE("params"); 4212 4213 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4214 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4215 4216 THROWS.checkIAE("scope", scope, "Storage.SharedStorageAccessScope", Storage.SharedStorageAccessScope); 4217 THROWS.checkIAE("method", method, "Storage.SharedStorageAccessMethod", Storage.SharedStorageAccessMethod); 4218 4219 this.accessTime = accessTime; 4220 this.scope = scope; 4221 this.method = method; 4222 this.mainFrameId = mainFrameId; 4223 this.ownerOrigin = ownerOrigin; 4224 this.ownerSite = ownerSite; 4225 this.params = params; 4226 } 4227 4228 /** 4229 * JSON Object Constructor 4230 * @param jo A Json-Object having data about an instance of {@code 'sharedStorageAccessed'}. 4231 */ 4232 public sharedStorageAccessed (JsonObject jo) 4233 { 4234 super("Storage", "sharedStorageAccessed", 7); 4235 4236 this.accessTime = ReadNumberJSON.get(jo, "accessTime", false, true); 4237 this.scope = ReadJSON.getString(jo, "scope", false, true); 4238 this.method = ReadJSON.getString(jo, "method", false, true); 4239 this.mainFrameId = ReadJSON.getString(jo, "mainFrameId", false, true); 4240 this.ownerOrigin = ReadJSON.getString(jo, "ownerOrigin", false, true); 4241 this.ownerSite = ReadJSON.getString(jo, "ownerSite", false, true); 4242 this.params = ReadJSON.getObject(jo, "params", Storage.SharedStorageAccessParams.class, false, true); 4243 } 4244 4245 4246 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4247 public boolean equals(Object other) 4248 { 4249 if (this == other) return true; 4250 if (other == null) return false; 4251 if (other.getClass() != this.getClass()) return false; 4252 4253 sharedStorageAccessed o = (sharedStorageAccessed) other; 4254 4255 return 4256 Objects.equals(this.accessTime, o.accessTime) 4257 && Objects.equals(this.scope, o.scope) 4258 && Objects.equals(this.method, o.method) 4259 && Objects.equals(this.mainFrameId, o.mainFrameId) 4260 && Objects.equals(this.ownerOrigin, o.ownerOrigin) 4261 && Objects.equals(this.ownerSite, o.ownerSite) 4262 && Objects.equals(this.params, o.params); 4263 } 4264 4265 /** Generates a Hash-Code for {@code 'this'} instance */ 4266 public int hashCode() 4267 { 4268 return 4269 Objects.hashCode(this.accessTime) 4270 + Objects.hashCode(this.scope) 4271 + Objects.hashCode(this.method) 4272 + Objects.hashCode(this.mainFrameId) 4273 + Objects.hashCode(this.ownerOrigin) 4274 + Objects.hashCode(this.ownerSite) 4275 + this.params.hashCode(); 4276 } 4277 } 4278 4279 /** 4280 * A shared storage run or selectURL operation finished its execution. 4281 * The following parameters are included in all events. 4282 */ 4283 public static class sharedStorageWorkletOperationExecutionFinished 4284 extends BrowserEvent 4285 implements java.io.Serializable 4286 { 4287 /** For Object Serialization. java.io.Serializable */ 4288 protected static final long serialVersionUID = 1; 4289 4290 public boolean[] optionals() 4291 { return new boolean[] { false, false, false, false, false, false, false, }; } 4292 4293 /** Time that the operation finished. */ 4294 public final Number finishedTime; 4295 4296 /** 4297 * Time, in microseconds, from start of shared storage JS API call until 4298 * end of operation execution in the worklet. 4299 */ 4300 public final int executionTime; 4301 4302 /** Enum value indicating the Shared Storage API method invoked. */ 4303 public final String method; 4304 4305 /** ID of the operation call. */ 4306 public final String operationId; 4307 4308 /** 4309 * Hex representation of the DevTools token used as the TargetID for the 4310 * associated shared storage worklet. 4311 */ 4312 public final String workletTargetId; 4313 4314 /** DevTools Frame Token for the primary frame tree's root. */ 4315 public final String mainFrameId; 4316 4317 /** Serialization of the origin owning the Shared Storage data. */ 4318 public final String ownerOrigin; 4319 4320 /** 4321 * Constructor 4322 * 4323 * @param finishedTime Time that the operation finished. 4324 * 4325 * @param executionTime 4326 * Time, in microseconds, from start of shared storage JS API call until 4327 * end of operation execution in the worklet. 4328 * 4329 * @param method Enum value indicating the Shared Storage API method invoked. 4330 * 4331 * @param operationId ID of the operation call. 4332 * 4333 * @param workletTargetId 4334 * Hex representation of the DevTools token used as the TargetID for the 4335 * associated shared storage worklet. 4336 * 4337 * @param mainFrameId DevTools Frame Token for the primary frame tree's root. 4338 * 4339 * @param ownerOrigin Serialization of the origin owning the Shared Storage data. 4340 */ 4341 public sharedStorageWorkletOperationExecutionFinished( 4342 Number finishedTime, int executionTime, String method, String operationId, 4343 String workletTargetId, String mainFrameId, String ownerOrigin 4344 ) 4345 { 4346 super("Storage", "sharedStorageWorkletOperationExecutionFinished", 7); 4347 4348 // Exception-Check(s) to ensure that if any parameters which are not declared as 4349 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4350 4351 if (finishedTime == null) THROWS.throwNPE("finishedTime"); 4352 if (method == null) THROWS.throwNPE("method"); 4353 if (operationId == null) THROWS.throwNPE("operationId"); 4354 if (workletTargetId == null) THROWS.throwNPE("workletTargetId"); 4355 if (mainFrameId == null) THROWS.throwNPE("mainFrameId"); 4356 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 4357 4358 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4359 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4360 4361 THROWS.checkIAE("method", method, "Storage.SharedStorageAccessMethod", Storage.SharedStorageAccessMethod); 4362 4363 this.finishedTime = finishedTime; 4364 this.executionTime = executionTime; 4365 this.method = method; 4366 this.operationId = operationId; 4367 this.workletTargetId = workletTargetId; 4368 this.mainFrameId = mainFrameId; 4369 this.ownerOrigin = ownerOrigin; 4370 } 4371 4372 /** 4373 * JSON Object Constructor 4374 * @param jo A Json-Object having data about an instance of {@code 'sharedStorageWorkletOperationExecutionFinished'}. 4375 */ 4376 public sharedStorageWorkletOperationExecutionFinished (JsonObject jo) 4377 { 4378 super("Storage", "sharedStorageWorkletOperationExecutionFinished", 7); 4379 4380 this.finishedTime = ReadNumberJSON.get(jo, "finishedTime", false, true); 4381 this.executionTime = ReadPrimJSON.getInt(jo, "executionTime"); 4382 this.method = ReadJSON.getString(jo, "method", false, true); 4383 this.operationId = ReadJSON.getString(jo, "operationId", false, true); 4384 this.workletTargetId = ReadJSON.getString(jo, "workletTargetId", false, true); 4385 this.mainFrameId = ReadJSON.getString(jo, "mainFrameId", false, true); 4386 this.ownerOrigin = ReadJSON.getString(jo, "ownerOrigin", false, true); 4387 } 4388 4389 4390 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4391 public boolean equals(Object other) 4392 { 4393 if (this == other) return true; 4394 if (other == null) return false; 4395 if (other.getClass() != this.getClass()) return false; 4396 4397 sharedStorageWorkletOperationExecutionFinished o = (sharedStorageWorkletOperationExecutionFinished) other; 4398 4399 return 4400 Objects.equals(this.finishedTime, o.finishedTime) 4401 && (this.executionTime == o.executionTime) 4402 && Objects.equals(this.method, o.method) 4403 && Objects.equals(this.operationId, o.operationId) 4404 && Objects.equals(this.workletTargetId, o.workletTargetId) 4405 && Objects.equals(this.mainFrameId, o.mainFrameId) 4406 && Objects.equals(this.ownerOrigin, o.ownerOrigin); 4407 } 4408 4409 /** Generates a Hash-Code for {@code 'this'} instance */ 4410 public int hashCode() 4411 { 4412 return 4413 Objects.hashCode(this.finishedTime) 4414 + this.executionTime 4415 + Objects.hashCode(this.method) 4416 + Objects.hashCode(this.operationId) 4417 + Objects.hashCode(this.workletTargetId) 4418 + Objects.hashCode(this.mainFrameId) 4419 + Objects.hashCode(this.ownerOrigin); 4420 } 4421 } 4422 4423 /** <CODE>[No Description Provided by Google]</CODE> */ 4424 public static class storageBucketCreatedOrUpdated 4425 extends BrowserEvent 4426 implements java.io.Serializable 4427 { 4428 /** For Object Serialization. java.io.Serializable */ 4429 protected static final long serialVersionUID = 1; 4430 4431 public boolean[] optionals() 4432 { return new boolean[] { false, }; } 4433 4434 /** <CODE>[No Description Provided by Google]</CODE> */ 4435 public final Storage.StorageBucketInfo bucketInfo; 4436 4437 /** 4438 * Constructor 4439 * 4440 * @param bucketInfo - 4441 */ 4442 public storageBucketCreatedOrUpdated(Storage.StorageBucketInfo bucketInfo) 4443 { 4444 super("Storage", "storageBucketCreatedOrUpdated", 1); 4445 4446 // Exception-Check(s) to ensure that if any parameters which are not declared as 4447 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4448 4449 if (bucketInfo == null) THROWS.throwNPE("bucketInfo"); 4450 4451 this.bucketInfo = bucketInfo; 4452 } 4453 4454 /** 4455 * JSON Object Constructor 4456 * @param jo A Json-Object having data about an instance of {@code 'storageBucketCreatedOrUpdated'}. 4457 */ 4458 public storageBucketCreatedOrUpdated (JsonObject jo) 4459 { 4460 super("Storage", "storageBucketCreatedOrUpdated", 1); 4461 4462 this.bucketInfo = ReadJSON.getObject(jo, "bucketInfo", Storage.StorageBucketInfo.class, false, true); 4463 } 4464 4465 4466 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4467 public boolean equals(Object other) 4468 { 4469 if (this == other) return true; 4470 if (other == null) return false; 4471 if (other.getClass() != this.getClass()) return false; 4472 4473 storageBucketCreatedOrUpdated o = (storageBucketCreatedOrUpdated) other; 4474 4475 return 4476 Objects.equals(this.bucketInfo, o.bucketInfo); 4477 } 4478 4479 /** Generates a Hash-Code for {@code 'this'} instance */ 4480 public int hashCode() 4481 { 4482 return 4483 this.bucketInfo.hashCode(); 4484 } 4485 } 4486 4487 /** <CODE>[No Description Provided by Google]</CODE> */ 4488 public static class storageBucketDeleted 4489 extends BrowserEvent 4490 implements java.io.Serializable 4491 { 4492 /** For Object Serialization. java.io.Serializable */ 4493 protected static final long serialVersionUID = 1; 4494 4495 public boolean[] optionals() 4496 { return new boolean[] { false, }; } 4497 4498 /** <CODE>[No Description Provided by Google]</CODE> */ 4499 public final String bucketId; 4500 4501 /** 4502 * Constructor 4503 * 4504 * @param bucketId - 4505 */ 4506 public storageBucketDeleted(String bucketId) 4507 { 4508 super("Storage", "storageBucketDeleted", 1); 4509 4510 // Exception-Check(s) to ensure that if any parameters which are not declared as 4511 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4512 4513 if (bucketId == null) THROWS.throwNPE("bucketId"); 4514 4515 this.bucketId = bucketId; 4516 } 4517 4518 /** 4519 * JSON Object Constructor 4520 * @param jo A Json-Object having data about an instance of {@code 'storageBucketDeleted'}. 4521 */ 4522 public storageBucketDeleted (JsonObject jo) 4523 { 4524 super("Storage", "storageBucketDeleted", 1); 4525 4526 this.bucketId = ReadJSON.getString(jo, "bucketId", false, true); 4527 } 4528 4529 4530 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4531 public boolean equals(Object other) 4532 { 4533 if (this == other) return true; 4534 if (other == null) return false; 4535 if (other.getClass() != this.getClass()) return false; 4536 4537 storageBucketDeleted o = (storageBucketDeleted) other; 4538 4539 return 4540 Objects.equals(this.bucketId, o.bucketId); 4541 } 4542 4543 /** Generates a Hash-Code for {@code 'this'} instance */ 4544 public int hashCode() 4545 { 4546 return 4547 Objects.hashCode(this.bucketId); 4548 } 4549 } 4550 4551 /** 4552 * <CODE>[No Description Provided by Google]</CODE> 4553 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 4554 */ 4555 public static class attributionReportingSourceRegistered 4556 extends BrowserEvent 4557 implements java.io.Serializable 4558 { 4559 /** For Object Serialization. java.io.Serializable */ 4560 protected static final long serialVersionUID = 1; 4561 4562 public boolean[] optionals() 4563 { return new boolean[] { false, false, }; } 4564 4565 /** <CODE>[No Description Provided by Google]</CODE> */ 4566 public final Storage.AttributionReportingSourceRegistration registration; 4567 4568 /** <CODE>[No Description Provided by Google]</CODE> */ 4569 public final String result; 4570 4571 /** 4572 * Constructor 4573 * 4574 * @param registration - 4575 * 4576 * @param result - 4577 */ 4578 public attributionReportingSourceRegistered 4579 (Storage.AttributionReportingSourceRegistration registration, String result) 4580 { 4581 super("Storage", "attributionReportingSourceRegistered", 2); 4582 4583 // Exception-Check(s) to ensure that if any parameters which are not declared as 4584 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4585 4586 if (registration == null) THROWS.throwNPE("registration"); 4587 if (result == null) THROWS.throwNPE("result"); 4588 4589 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4590 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4591 4592 THROWS.checkIAE("result", result, "Storage.AttributionReportingSourceRegistrationResult", Storage.AttributionReportingSourceRegistrationResult); 4593 4594 this.registration = registration; 4595 this.result = result; 4596 } 4597 4598 /** 4599 * JSON Object Constructor 4600 * @param jo A Json-Object having data about an instance of {@code 'attributionReportingSourceRegistered'}. 4601 */ 4602 public attributionReportingSourceRegistered (JsonObject jo) 4603 { 4604 super("Storage", "attributionReportingSourceRegistered", 2); 4605 4606 this.registration = ReadJSON.getObject(jo, "registration", Storage.AttributionReportingSourceRegistration.class, false, true); 4607 this.result = ReadJSON.getString(jo, "result", false, true); 4608 } 4609 4610 4611 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4612 public boolean equals(Object other) 4613 { 4614 if (this == other) return true; 4615 if (other == null) return false; 4616 if (other.getClass() != this.getClass()) return false; 4617 4618 attributionReportingSourceRegistered o = (attributionReportingSourceRegistered) other; 4619 4620 return 4621 Objects.equals(this.registration, o.registration) 4622 && Objects.equals(this.result, o.result); 4623 } 4624 4625 /** Generates a Hash-Code for {@code 'this'} instance */ 4626 public int hashCode() 4627 { 4628 return 4629 this.registration.hashCode() 4630 + Objects.hashCode(this.result); 4631 } 4632 } 4633 4634 /** 4635 * <CODE>[No Description Provided by Google]</CODE> 4636 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 4637 */ 4638 public static class attributionReportingTriggerRegistered 4639 extends BrowserEvent 4640 implements java.io.Serializable 4641 { 4642 /** For Object Serialization. java.io.Serializable */ 4643 protected static final long serialVersionUID = 1; 4644 4645 public boolean[] optionals() 4646 { return new boolean[] { false, false, false, }; } 4647 4648 /** <CODE>[No Description Provided by Google]</CODE> */ 4649 public final Storage.AttributionReportingTriggerRegistration registration; 4650 4651 /** <CODE>[No Description Provided by Google]</CODE> */ 4652 public final String eventLevel; 4653 4654 /** <CODE>[No Description Provided by Google]</CODE> */ 4655 public final String aggregatable; 4656 4657 /** 4658 * Constructor 4659 * 4660 * @param registration - 4661 * 4662 * @param eventLevel - 4663 * 4664 * @param aggregatable - 4665 */ 4666 public attributionReportingTriggerRegistered( 4667 Storage.AttributionReportingTriggerRegistration registration, String eventLevel, 4668 String aggregatable 4669 ) 4670 { 4671 super("Storage", "attributionReportingTriggerRegistered", 3); 4672 4673 // Exception-Check(s) to ensure that if any parameters which are not declared as 4674 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4675 4676 if (registration == null) THROWS.throwNPE("registration"); 4677 if (eventLevel == null) THROWS.throwNPE("eventLevel"); 4678 if (aggregatable == null) THROWS.throwNPE("aggregatable"); 4679 4680 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4681 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4682 4683 THROWS.checkIAE("eventLevel", eventLevel, "Storage.AttributionReportingEventLevelResult", Storage.AttributionReportingEventLevelResult); 4684 THROWS.checkIAE("aggregatable", aggregatable, "Storage.AttributionReportingAggregatableResult", Storage.AttributionReportingAggregatableResult); 4685 4686 this.registration = registration; 4687 this.eventLevel = eventLevel; 4688 this.aggregatable = aggregatable; 4689 } 4690 4691 /** 4692 * JSON Object Constructor 4693 * @param jo A Json-Object having data about an instance of {@code 'attributionReportingTriggerRegistered'}. 4694 */ 4695 public attributionReportingTriggerRegistered (JsonObject jo) 4696 { 4697 super("Storage", "attributionReportingTriggerRegistered", 3); 4698 4699 this.registration = ReadJSON.getObject(jo, "registration", Storage.AttributionReportingTriggerRegistration.class, false, true); 4700 this.eventLevel = ReadJSON.getString(jo, "eventLevel", false, true); 4701 this.aggregatable = ReadJSON.getString(jo, "aggregatable", false, true); 4702 } 4703 4704 4705 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4706 public boolean equals(Object other) 4707 { 4708 if (this == other) return true; 4709 if (other == null) return false; 4710 if (other.getClass() != this.getClass()) return false; 4711 4712 attributionReportingTriggerRegistered o = (attributionReportingTriggerRegistered) other; 4713 4714 return 4715 Objects.equals(this.registration, o.registration) 4716 && Objects.equals(this.eventLevel, o.eventLevel) 4717 && Objects.equals(this.aggregatable, o.aggregatable); 4718 } 4719 4720 /** Generates a Hash-Code for {@code 'this'} instance */ 4721 public int hashCode() 4722 { 4723 return 4724 this.registration.hashCode() 4725 + Objects.hashCode(this.eventLevel) 4726 + Objects.hashCode(this.aggregatable); 4727 } 4728 } 4729 4730 /** 4731 * <CODE>[No Description Provided by Google]</CODE> 4732 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 4733 */ 4734 public static class attributionReportingReportSent 4735 extends BrowserEvent 4736 implements java.io.Serializable 4737 { 4738 /** For Object Serialization. java.io.Serializable */ 4739 protected static final long serialVersionUID = 1; 4740 4741 public boolean[] optionals() 4742 { return new boolean[] { false, false, false, true, true, true, }; } 4743 4744 /** <CODE>[No Description Provided by Google]</CODE> */ 4745 public final String url; 4746 4747 /** <CODE>[No Description Provided by Google]</CODE> */ 4748 public final JsonObject body; 4749 4750 /** <CODE>[No Description Provided by Google]</CODE> */ 4751 public final String result; 4752 4753 /** 4754 * If result is {@code sent}, populated with net/HTTP status. 4755 * <BR /><B CLASS=Opt>OPTIONAL</B> 4756 */ 4757 public final Integer netError; 4758 4759 /** 4760 * <CODE>[No Description Provided by Google]</CODE> 4761 * <BR /><B CLASS=Opt>OPTIONAL</B> 4762 */ 4763 public final String netErrorName; 4764 4765 /** 4766 * <CODE>[No Description Provided by Google]</CODE> 4767 * <BR /><B CLASS=Opt>OPTIONAL</B> 4768 */ 4769 public final Integer httpStatusCode; 4770 4771 /** 4772 * Constructor 4773 * 4774 * @param url - 4775 * 4776 * @param body - 4777 * 4778 * @param result - 4779 * 4780 * @param netError If result is {@code sent}, populated with net/HTTP status. 4781 * <BR /><B CLASS=Opt>OPTIONAL</B> 4782 * 4783 * @param netErrorName - 4784 * <BR /><B CLASS=Opt>OPTIONAL</B> 4785 * 4786 * @param httpStatusCode - 4787 * <BR /><B CLASS=Opt>OPTIONAL</B> 4788 */ 4789 public attributionReportingReportSent( 4790 String url, JsonObject body, String result, Integer netError, String netErrorName, 4791 Integer httpStatusCode 4792 ) 4793 { 4794 super("Storage", "attributionReportingReportSent", 6); 4795 4796 // Exception-Check(s) to ensure that if any parameters which are not declared as 4797 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4798 4799 if (url == null) THROWS.throwNPE("url"); 4800 if (body == null) THROWS.throwNPE("body"); 4801 if (result == null) THROWS.throwNPE("result"); 4802 4803 // Exception-Check(s) to ensure that if any parameters which must adhere to a 4804 // provided List of Enumerated Values, fails, then IllegalArgumentException shall throw. 4805 4806 THROWS.checkIAE("result", result, "Storage.AttributionReportingReportResult", Storage.AttributionReportingReportResult); 4807 4808 this.url = url; 4809 this.body = body; 4810 this.result = result; 4811 this.netError = netError; 4812 this.netErrorName = netErrorName; 4813 this.httpStatusCode = httpStatusCode; 4814 } 4815 4816 /** 4817 * JSON Object Constructor 4818 * @param jo A Json-Object having data about an instance of {@code 'attributionReportingReportSent'}. 4819 */ 4820 public attributionReportingReportSent (JsonObject jo) 4821 { 4822 super("Storage", "attributionReportingReportSent", 6); 4823 4824 this.url = ReadJSON.getString(jo, "url", false, true); 4825 this.body = jo.getJsonObject("body"); 4826 this.result = ReadJSON.getString(jo, "result", false, true); 4827 this.netError = ReadBoxedJSON.getInteger(jo, "netError", true); 4828 this.netErrorName = ReadJSON.getString(jo, "netErrorName", true, false); 4829 this.httpStatusCode = ReadBoxedJSON.getInteger(jo, "httpStatusCode", true); 4830 } 4831 4832 4833 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4834 public boolean equals(Object other) 4835 { 4836 if (this == other) return true; 4837 if (other == null) return false; 4838 if (other.getClass() != this.getClass()) return false; 4839 4840 attributionReportingReportSent o = (attributionReportingReportSent) other; 4841 4842 return 4843 Objects.equals(this.url, o.url) 4844 && Objects.equals(this.body, o.body) 4845 && Objects.equals(this.result, o.result) 4846 && Objects.equals(this.netError, o.netError) 4847 && Objects.equals(this.netErrorName, o.netErrorName) 4848 && Objects.equals(this.httpStatusCode, o.httpStatusCode); 4849 } 4850 4851 /** Generates a Hash-Code for {@code 'this'} instance */ 4852 public int hashCode() 4853 { 4854 return 4855 Objects.hashCode(this.url) 4856 + Objects.hashCode(this.body) 4857 + Objects.hashCode(this.result) 4858 + Objects.hashCode(this.netError) 4859 + Objects.hashCode(this.netErrorName) 4860 + Objects.hashCode(this.httpStatusCode); 4861 } 4862 } 4863 4864 /** 4865 * <CODE>[No Description Provided by Google]</CODE> 4866 * <BR /><B CLASS=Exp>EXPERIMENTAL</B> 4867 */ 4868 public static class attributionReportingVerboseDebugReportSent 4869 extends BrowserEvent 4870 implements java.io.Serializable 4871 { 4872 /** For Object Serialization. java.io.Serializable */ 4873 protected static final long serialVersionUID = 1; 4874 4875 public boolean[] optionals() 4876 { return new boolean[] { false, true, true, true, true, }; } 4877 4878 /** <CODE>[No Description Provided by Google]</CODE> */ 4879 public final String url; 4880 4881 /** 4882 * <CODE>[No Description Provided by Google]</CODE> 4883 * <BR /><B CLASS=Opt>OPTIONAL</B> 4884 */ 4885 public final JsonArray body; 4886 4887 /** 4888 * <CODE>[No Description Provided by Google]</CODE> 4889 * <BR /><B CLASS=Opt>OPTIONAL</B> 4890 */ 4891 public final Integer netError; 4892 4893 /** 4894 * <CODE>[No Description Provided by Google]</CODE> 4895 * <BR /><B CLASS=Opt>OPTIONAL</B> 4896 */ 4897 public final String netErrorName; 4898 4899 /** 4900 * <CODE>[No Description Provided by Google]</CODE> 4901 * <BR /><B CLASS=Opt>OPTIONAL</B> 4902 */ 4903 public final Integer httpStatusCode; 4904 4905 /** 4906 * Constructor 4907 * 4908 * @param url - 4909 * 4910 * @param body - 4911 * <BR /><B CLASS=Opt>OPTIONAL</B> 4912 * 4913 * @param netError - 4914 * <BR /><B CLASS=Opt>OPTIONAL</B> 4915 * 4916 * @param netErrorName - 4917 * <BR /><B CLASS=Opt>OPTIONAL</B> 4918 * 4919 * @param httpStatusCode - 4920 * <BR /><B CLASS=Opt>OPTIONAL</B> 4921 */ 4922 public attributionReportingVerboseDebugReportSent( 4923 String url, JsonArray body, Integer netError, String netErrorName, 4924 Integer httpStatusCode 4925 ) 4926 { 4927 super("Storage", "attributionReportingVerboseDebugReportSent", 5); 4928 4929 // Exception-Check(s) to ensure that if any parameters which are not declared as 4930 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 4931 4932 if (url == null) THROWS.throwNPE("url"); 4933 4934 this.url = url; 4935 this.body = body; 4936 this.netError = netError; 4937 this.netErrorName = netErrorName; 4938 this.httpStatusCode = httpStatusCode; 4939 } 4940 4941 /** 4942 * JSON Object Constructor 4943 * @param jo A Json-Object having data about an instance of {@code 'attributionReportingVerboseDebugReportSent'}. 4944 */ 4945 public attributionReportingVerboseDebugReportSent (JsonObject jo) 4946 { 4947 super("Storage", "attributionReportingVerboseDebugReportSent", 5); 4948 4949 this.url = ReadJSON.getString(jo, "url", false, true); 4950 this.body = jo.getJsonArray("body"); 4951 this.netError = ReadBoxedJSON.getInteger(jo, "netError", true); 4952 this.netErrorName = ReadJSON.getString(jo, "netErrorName", true, false); 4953 this.httpStatusCode = ReadBoxedJSON.getInteger(jo, "httpStatusCode", true); 4954 } 4955 4956 4957 /** Checks whether {@code 'this'} equals an input Java-{@code Object} */ 4958 public boolean equals(Object other) 4959 { 4960 if (this == other) return true; 4961 if (other == null) return false; 4962 if (other.getClass() != this.getClass()) return false; 4963 4964 attributionReportingVerboseDebugReportSent o = (attributionReportingVerboseDebugReportSent) other; 4965 4966 return 4967 Objects.equals(this.url, o.url) 4968 && Objects.equals(this.body, o.body) 4969 && Objects.equals(this.netError, o.netError) 4970 && Objects.equals(this.netErrorName, o.netErrorName) 4971 && Objects.equals(this.httpStatusCode, o.httpStatusCode); 4972 } 4973 4974 /** Generates a Hash-Code for {@code 'this'} instance */ 4975 public int hashCode() 4976 { 4977 return 4978 Objects.hashCode(this.url) 4979 + Objects.hashCode(this.body) 4980 + Objects.hashCode(this.netError) 4981 + Objects.hashCode(this.netErrorName) 4982 + Objects.hashCode(this.httpStatusCode); 4983 } 4984 } 4985 4986 4987 // Counter for keeping the WebSocket Request ID's distinct. 4988 private static int counter = 1; 4989 4990 /** 4991 * Returns a storage key given a frame id. 4992 * 4993 * @param frameId - 4994 * 4995 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 4996 * String></CODE> 4997 * 4998 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 4999 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5000 * String></CODE> will be returned. 5001 * 5002 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5003 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5004 * may be retrieved.</I> 5005 * 5006 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5007 * <BR /><BR /><UL CLASS=JDUL> 5008 * <LI><CODE>String (<B>storageKey</B></CODE>) 5009 * <BR />- 5010 * </LI> 5011 * </UL> */ 5012 public static Script<String, JsonObject, String> getStorageKeyForFrame(String frameId) 5013 { 5014 // Exception-Check(s) to ensure that if any parameters which are not declared as 5015 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5016 5017 if (frameId == null) THROWS.throwNPE("frameId"); 5018 5019 final int webSocketID = 40000000 + counter++; 5020 final boolean[] optionals = { false, }; 5021 5022 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5023 String requestJSON = WriteJSON.get( 5024 parameterTypes.get("getStorageKeyForFrame"), 5025 parameterNames.get("getStorageKeyForFrame"), 5026 optionals, webSocketID, 5027 "Storage.getStorageKeyForFrame", 5028 frameId 5029 ); 5030 5031 // 'JSON Binding' ... Converts Browser Response-JSON to 'String' 5032 Function<JsonObject, String> responseProcessor = (JsonObject jo) -> 5033 ReadJSON.getString(jo, "storageKey", false, true); 5034 5035 return new Script<>(webSocketID, requestJSON, responseProcessor); 5036 } 5037 5038 /** 5039 * Clears storage for origin. 5040 * 5041 * @param origin Security origin. 5042 * 5043 * @param storageTypes Comma separated list of StorageType to clear. 5044 * 5045 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5046 * {@link Ret0}></CODE> 5047 * 5048 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5049 * browser receives the invocation-request. 5050 * 5051 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5052 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5053 * {@code >} to ensure the Browser Function has run to completion. 5054 */ 5055 public static Script<String, JsonObject, Ret0> clearDataForOrigin 5056 (String origin, String storageTypes) 5057 { 5058 // Exception-Check(s) to ensure that if any parameters which are not declared as 5059 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5060 5061 if (origin == null) THROWS.throwNPE("origin"); 5062 if (storageTypes == null) THROWS.throwNPE("storageTypes"); 5063 5064 final int webSocketID = 40001000 + counter++; 5065 final boolean[] optionals = { false, false, }; 5066 5067 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5068 String requestJSON = WriteJSON.get( 5069 parameterTypes.get("clearDataForOrigin"), 5070 parameterNames.get("clearDataForOrigin"), 5071 optionals, webSocketID, 5072 "Storage.clearDataForOrigin", 5073 origin, storageTypes 5074 ); 5075 5076 // This Remote Command does not have a Return-Value. 5077 return new Script<> 5078 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5079 } 5080 5081 /** 5082 * Clears storage for storage key. 5083 * 5084 * @param storageKey Storage key. 5085 * 5086 * @param storageTypes Comma separated list of StorageType to clear. 5087 * 5088 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5089 * {@link Ret0}></CODE> 5090 * 5091 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5092 * browser receives the invocation-request. 5093 * 5094 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5095 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5096 * {@code >} to ensure the Browser Function has run to completion. 5097 */ 5098 public static Script<String, JsonObject, Ret0> clearDataForStorageKey 5099 (String storageKey, String storageTypes) 5100 { 5101 // Exception-Check(s) to ensure that if any parameters which are not declared as 5102 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5103 5104 if (storageKey == null) THROWS.throwNPE("storageKey"); 5105 if (storageTypes == null) THROWS.throwNPE("storageTypes"); 5106 5107 final int webSocketID = 40002000 + counter++; 5108 final boolean[] optionals = { false, false, }; 5109 5110 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5111 String requestJSON = WriteJSON.get( 5112 parameterTypes.get("clearDataForStorageKey"), 5113 parameterNames.get("clearDataForStorageKey"), 5114 optionals, webSocketID, 5115 "Storage.clearDataForStorageKey", 5116 storageKey, storageTypes 5117 ); 5118 5119 // This Remote Command does not have a Return-Value. 5120 return new Script<> 5121 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5122 } 5123 5124 /** 5125 * Returns all browser cookies. 5126 * 5127 * @param browserContextId Browser context to use when called on the browser endpoint. 5128 * <BR /><B CLASS=Opt>OPTIONAL</B> 5129 * 5130 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5131 * {@link Network.Cookie}[]></CODE> 5132 * 5133 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5134 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5135 * {@link Network.Cookie}[]></CODE> will be returned. 5136 * 5137 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5138 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5139 * may be retrieved.</I> 5140 * 5141 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5142 * <BR /><BR /><UL CLASS=JDUL> 5143 * <LI><CODE>{@link Network.Cookie}[] (<B>cookies</B></CODE>) 5144 * <BR />Array of cookie objects. 5145 * </LI> 5146 * </UL> */ 5147 public static Script<String, JsonObject, Network.Cookie[]> getCookies 5148 (String browserContextId) 5149 { 5150 final int webSocketID = 40003000 + counter++; 5151 final boolean[] optionals = { true, }; 5152 5153 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5154 String requestJSON = WriteJSON.get( 5155 parameterTypes.get("getCookies"), 5156 parameterNames.get("getCookies"), 5157 optionals, webSocketID, 5158 "Storage.getCookies", 5159 browserContextId 5160 ); 5161 5162 // 'JSON Binding' ... Converts Browser Response-JSON to 'Network.Cookie[]' 5163 Function<JsonObject, Network.Cookie[]> responseProcessor = (JsonObject jo) -> 5164 (jo.getJsonArray("cookies") == null) 5165 ? null 5166 : RJArrIntoStream.objArr(jo.getJsonArray("cookies"), null, 0, Network.Cookie.class).toArray(Network.Cookie[]::new); 5167 5168 return new Script<>(webSocketID, requestJSON, responseProcessor); 5169 } 5170 5171 /** 5172 * Sets given cookies. 5173 * 5174 * @param cookies Cookies to be set. 5175 * 5176 * @param browserContextId Browser context to use when called on the browser endpoint. 5177 * <BR /><B CLASS=Opt>OPTIONAL</B> 5178 * 5179 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5180 * {@link Ret0}></CODE> 5181 * 5182 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5183 * browser receives the invocation-request. 5184 * 5185 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5186 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5187 * {@code >} to ensure the Browser Function has run to completion. 5188 */ 5189 public static Script<String, JsonObject, Ret0> setCookies 5190 (Network.CookieParam[] cookies, String browserContextId) 5191 { 5192 // Exception-Check(s) to ensure that if any parameters which are not declared as 5193 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5194 5195 if (cookies == null) THROWS.throwNPE("cookies"); 5196 5197 final int webSocketID = 40004000 + counter++; 5198 final boolean[] optionals = { false, true, }; 5199 5200 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5201 String requestJSON = WriteJSON.get( 5202 parameterTypes.get("setCookies"), 5203 parameterNames.get("setCookies"), 5204 optionals, webSocketID, 5205 "Storage.setCookies", 5206 cookies, browserContextId 5207 ); 5208 5209 // This Remote Command does not have a Return-Value. 5210 return new Script<> 5211 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5212 } 5213 5214 /** 5215 * Clears cookies. 5216 * 5217 * @param browserContextId Browser context to use when called on the browser endpoint. 5218 * <BR /><B CLASS=Opt>OPTIONAL</B> 5219 * 5220 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5221 * {@link Ret0}></CODE> 5222 * 5223 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5224 * browser receives the invocation-request. 5225 * 5226 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5227 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5228 * {@code >} to ensure the Browser Function has run to completion. 5229 */ 5230 public static Script<String, JsonObject, Ret0> clearCookies(String browserContextId) 5231 { 5232 final int webSocketID = 40005000 + counter++; 5233 final boolean[] optionals = { true, }; 5234 5235 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5236 String requestJSON = WriteJSON.get( 5237 parameterTypes.get("clearCookies"), 5238 parameterNames.get("clearCookies"), 5239 optionals, webSocketID, 5240 "Storage.clearCookies", 5241 browserContextId 5242 ); 5243 5244 // This Remote Command does not have a Return-Value. 5245 return new Script<> 5246 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5247 } 5248 5249 /** 5250 * Returns usage and quota in bytes. 5251 * 5252 * @param origin Security origin. 5253 * 5254 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5255 * {@link Ret4}></CODE> 5256 * 5257 * <BR /><BR />This {@link Script} may be <B STYLE='color:red'>executed</B> (using 5258 * {@link Script#exec()}), and a {@link Promise} returned. 5259 * 5260 * <BR /><BR />When the {@code Promise} is <B STYLE='color: red'>awaited</B> 5261 * (using {@link Promise#await()}), the {@code Ret4} will subsequently 5262 * be returned from that call. 5263 * 5264 * <BR /><BR />The <B STYLE='color: red'>returned</B> values are encapsulated 5265 * in an instance of <B>{@link Ret4}</B> 5266 * 5267 * <BR /><BR /><UL CLASS=JDUL> 5268 * <LI><CODE><B>Ret4.a:</B> Number (<B>usage</B>)</CODE> 5269 * <BR />Storage usage (bytes). 5270 * <BR /><BR /></LI> 5271 * <LI><CODE><B>Ret4.b:</B> Number (<B>quota</B>)</CODE> 5272 * <BR />Storage quota (bytes). 5273 * <BR /><BR /></LI> 5274 * <LI><CODE><B>Ret4.c:</B> Boolean (<B>overrideActive</B>)</CODE> 5275 * <BR />Whether or not the origin has an active storage quota override 5276 * <BR /><BR /></LI> 5277 * <LI><CODE><B>Ret4.d:</B> {@link Storage.UsageForType}[] (<B>usageBreakdown</B>)</CODE> 5278 * <BR />Storage usage per type (bytes). 5279 * </LI> 5280 * </UL> 5281 */ 5282 public static Script<String, JsonObject, Ret4<Number, Number, Boolean, Storage.UsageForType[]>> getUsageAndQuota 5283 (String origin) 5284 { 5285 // Exception-Check(s) to ensure that if any parameters which are not declared as 5286 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5287 5288 if (origin == null) THROWS.throwNPE("origin"); 5289 5290 final int webSocketID = 40006000 + counter++; 5291 final boolean[] optionals = { false, }; 5292 5293 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5294 String requestJSON = WriteJSON.get( 5295 parameterTypes.get("getUsageAndQuota"), 5296 parameterNames.get("getUsageAndQuota"), 5297 optionals, webSocketID, 5298 "Storage.getUsageAndQuota", 5299 origin 5300 ); 5301 5302 // 'JSON Binding' ... Converts Browser Response-JSON into Java-Type 'Ret4' 5303 Function<JsonObject, Ret4<Number, Number, Boolean, Storage.UsageForType[]>> 5304 responseProcessor = (JsonObject jo) -> new Ret4<>( 5305 ReadNumberJSON.get(jo, "usage", false, true), 5306 ReadNumberJSON.get(jo, "quota", false, true), 5307 ReadBoxedJSON.getBoolean(jo, "overrideActive", true), 5308 (jo.getJsonArray("usageBreakdown") == null) 5309 ? null 5310 : RJArrIntoStream.objArr(jo.getJsonArray("usageBreakdown"), null, 0, Storage.UsageForType.class).toArray(Storage.UsageForType[]::new) 5311 ); 5312 5313 return new Script<>(webSocketID, requestJSON, responseProcessor); 5314 } 5315 5316 /** 5317 * Override quota for the specified origin 5318 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5319 * 5320 * @param origin Security origin. 5321 * 5322 * @param quotaSize 5323 * The quota size (in bytes) to override the original quota with. 5324 * If this is called multiple times, the overridden quota will be equal to 5325 * the quotaSize provided in the final call. If this is called without 5326 * specifying a quotaSize, the quota will be reset to the default value for 5327 * the specified origin. If this is called multiple times with different 5328 * origins, the override will be maintained for each origin until it is 5329 * disabled (called without a quotaSize). 5330 * <BR /><B CLASS=Opt>OPTIONAL</B> 5331 * 5332 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5333 * {@link Ret0}></CODE> 5334 * 5335 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5336 * browser receives the invocation-request. 5337 * 5338 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5339 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5340 * {@code >} to ensure the Browser Function has run to completion. 5341 */ 5342 public static Script<String, JsonObject, Ret0> overrideQuotaForOrigin 5343 (String origin, Number quotaSize) 5344 { 5345 // Exception-Check(s) to ensure that if any parameters which are not declared as 5346 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5347 5348 if (origin == null) THROWS.throwNPE("origin"); 5349 5350 final int webSocketID = 40007000 + counter++; 5351 final boolean[] optionals = { false, true, }; 5352 5353 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5354 String requestJSON = WriteJSON.get( 5355 parameterTypes.get("overrideQuotaForOrigin"), 5356 parameterNames.get("overrideQuotaForOrigin"), 5357 optionals, webSocketID, 5358 "Storage.overrideQuotaForOrigin", 5359 origin, quotaSize 5360 ); 5361 5362 // This Remote Command does not have a Return-Value. 5363 return new Script<> 5364 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5365 } 5366 5367 /** 5368 * Registers origin to be notified when an update occurs to its cache storage list. 5369 * 5370 * @param origin Security origin. 5371 * 5372 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5373 * {@link Ret0}></CODE> 5374 * 5375 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5376 * browser receives the invocation-request. 5377 * 5378 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5379 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5380 * {@code >} to ensure the Browser Function has run to completion. 5381 */ 5382 public static Script<String, JsonObject, Ret0> trackCacheStorageForOrigin(String origin) 5383 { 5384 // Exception-Check(s) to ensure that if any parameters which are not declared as 5385 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5386 5387 if (origin == null) THROWS.throwNPE("origin"); 5388 5389 final int webSocketID = 40008000 + counter++; 5390 final boolean[] optionals = { false, }; 5391 5392 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5393 String requestJSON = WriteJSON.get( 5394 parameterTypes.get("trackCacheStorageForOrigin"), 5395 parameterNames.get("trackCacheStorageForOrigin"), 5396 optionals, webSocketID, 5397 "Storage.trackCacheStorageForOrigin", 5398 origin 5399 ); 5400 5401 // This Remote Command does not have a Return-Value. 5402 return new Script<> 5403 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5404 } 5405 5406 /** 5407 * Registers storage key to be notified when an update occurs to its cache storage list. 5408 * 5409 * @param storageKey Storage key. 5410 * 5411 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5412 * {@link Ret0}></CODE> 5413 * 5414 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5415 * browser receives the invocation-request. 5416 * 5417 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5418 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5419 * {@code >} to ensure the Browser Function has run to completion. 5420 */ 5421 public static Script<String, JsonObject, Ret0> trackCacheStorageForStorageKey 5422 (String storageKey) 5423 { 5424 // Exception-Check(s) to ensure that if any parameters which are not declared as 5425 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5426 5427 if (storageKey == null) THROWS.throwNPE("storageKey"); 5428 5429 final int webSocketID = 40009000 + counter++; 5430 final boolean[] optionals = { false, }; 5431 5432 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5433 String requestJSON = WriteJSON.get( 5434 parameterTypes.get("trackCacheStorageForStorageKey"), 5435 parameterNames.get("trackCacheStorageForStorageKey"), 5436 optionals, webSocketID, 5437 "Storage.trackCacheStorageForStorageKey", 5438 storageKey 5439 ); 5440 5441 // This Remote Command does not have a Return-Value. 5442 return new Script<> 5443 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5444 } 5445 5446 /** 5447 * Registers origin to be notified when an update occurs to its IndexedDB. 5448 * 5449 * @param origin Security origin. 5450 * 5451 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5452 * {@link Ret0}></CODE> 5453 * 5454 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5455 * browser receives the invocation-request. 5456 * 5457 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5458 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5459 * {@code >} to ensure the Browser Function has run to completion. 5460 */ 5461 public static Script<String, JsonObject, Ret0> trackIndexedDBForOrigin(String origin) 5462 { 5463 // Exception-Check(s) to ensure that if any parameters which are not declared as 5464 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5465 5466 if (origin == null) THROWS.throwNPE("origin"); 5467 5468 final int webSocketID = 40010000 + counter++; 5469 final boolean[] optionals = { false, }; 5470 5471 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5472 String requestJSON = WriteJSON.get( 5473 parameterTypes.get("trackIndexedDBForOrigin"), 5474 parameterNames.get("trackIndexedDBForOrigin"), 5475 optionals, webSocketID, 5476 "Storage.trackIndexedDBForOrigin", 5477 origin 5478 ); 5479 5480 // This Remote Command does not have a Return-Value. 5481 return new Script<> 5482 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5483 } 5484 5485 /** 5486 * Registers storage key to be notified when an update occurs to its IndexedDB. 5487 * 5488 * @param storageKey Storage key. 5489 * 5490 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5491 * {@link Ret0}></CODE> 5492 * 5493 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5494 * browser receives the invocation-request. 5495 * 5496 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5497 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5498 * {@code >} to ensure the Browser Function has run to completion. 5499 */ 5500 public static Script<String, JsonObject, Ret0> trackIndexedDBForStorageKey 5501 (String storageKey) 5502 { 5503 // Exception-Check(s) to ensure that if any parameters which are not declared as 5504 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5505 5506 if (storageKey == null) THROWS.throwNPE("storageKey"); 5507 5508 final int webSocketID = 40011000 + counter++; 5509 final boolean[] optionals = { false, }; 5510 5511 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5512 String requestJSON = WriteJSON.get( 5513 parameterTypes.get("trackIndexedDBForStorageKey"), 5514 parameterNames.get("trackIndexedDBForStorageKey"), 5515 optionals, webSocketID, 5516 "Storage.trackIndexedDBForStorageKey", 5517 storageKey 5518 ); 5519 5520 // This Remote Command does not have a Return-Value. 5521 return new Script<> 5522 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5523 } 5524 5525 /** 5526 * Unregisters origin from receiving notifications for cache storage. 5527 * 5528 * @param origin Security origin. 5529 * 5530 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5531 * {@link Ret0}></CODE> 5532 * 5533 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5534 * browser receives the invocation-request. 5535 * 5536 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5537 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5538 * {@code >} to ensure the Browser Function has run to completion. 5539 */ 5540 public static Script<String, JsonObject, Ret0> untrackCacheStorageForOrigin(String origin) 5541 { 5542 // Exception-Check(s) to ensure that if any parameters which are not declared as 5543 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5544 5545 if (origin == null) THROWS.throwNPE("origin"); 5546 5547 final int webSocketID = 40012000 + counter++; 5548 final boolean[] optionals = { false, }; 5549 5550 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5551 String requestJSON = WriteJSON.get( 5552 parameterTypes.get("untrackCacheStorageForOrigin"), 5553 parameterNames.get("untrackCacheStorageForOrigin"), 5554 optionals, webSocketID, 5555 "Storage.untrackCacheStorageForOrigin", 5556 origin 5557 ); 5558 5559 // This Remote Command does not have a Return-Value. 5560 return new Script<> 5561 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5562 } 5563 5564 /** 5565 * Unregisters storage key from receiving notifications for cache storage. 5566 * 5567 * @param storageKey Storage key. 5568 * 5569 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5570 * {@link Ret0}></CODE> 5571 * 5572 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5573 * browser receives the invocation-request. 5574 * 5575 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5576 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5577 * {@code >} to ensure the Browser Function has run to completion. 5578 */ 5579 public static Script<String, JsonObject, Ret0> untrackCacheStorageForStorageKey 5580 (String storageKey) 5581 { 5582 // Exception-Check(s) to ensure that if any parameters which are not declared as 5583 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5584 5585 if (storageKey == null) THROWS.throwNPE("storageKey"); 5586 5587 final int webSocketID = 40013000 + counter++; 5588 final boolean[] optionals = { false, }; 5589 5590 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5591 String requestJSON = WriteJSON.get( 5592 parameterTypes.get("untrackCacheStorageForStorageKey"), 5593 parameterNames.get("untrackCacheStorageForStorageKey"), 5594 optionals, webSocketID, 5595 "Storage.untrackCacheStorageForStorageKey", 5596 storageKey 5597 ); 5598 5599 // This Remote Command does not have a Return-Value. 5600 return new Script<> 5601 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5602 } 5603 5604 /** 5605 * Unregisters origin from receiving notifications for IndexedDB. 5606 * 5607 * @param origin Security origin. 5608 * 5609 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5610 * {@link Ret0}></CODE> 5611 * 5612 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5613 * browser receives the invocation-request. 5614 * 5615 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5616 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5617 * {@code >} to ensure the Browser Function has run to completion. 5618 */ 5619 public static Script<String, JsonObject, Ret0> untrackIndexedDBForOrigin(String origin) 5620 { 5621 // Exception-Check(s) to ensure that if any parameters which are not declared as 5622 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5623 5624 if (origin == null) THROWS.throwNPE("origin"); 5625 5626 final int webSocketID = 40014000 + counter++; 5627 final boolean[] optionals = { false, }; 5628 5629 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5630 String requestJSON = WriteJSON.get( 5631 parameterTypes.get("untrackIndexedDBForOrigin"), 5632 parameterNames.get("untrackIndexedDBForOrigin"), 5633 optionals, webSocketID, 5634 "Storage.untrackIndexedDBForOrigin", 5635 origin 5636 ); 5637 5638 // This Remote Command does not have a Return-Value. 5639 return new Script<> 5640 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5641 } 5642 5643 /** 5644 * Unregisters storage key from receiving notifications for IndexedDB. 5645 * 5646 * @param storageKey Storage key. 5647 * 5648 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5649 * {@link Ret0}></CODE> 5650 * 5651 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5652 * browser receives the invocation-request. 5653 * 5654 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5655 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5656 * {@code >} to ensure the Browser Function has run to completion. 5657 */ 5658 public static Script<String, JsonObject, Ret0> untrackIndexedDBForStorageKey 5659 (String storageKey) 5660 { 5661 // Exception-Check(s) to ensure that if any parameters which are not declared as 5662 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5663 5664 if (storageKey == null) THROWS.throwNPE("storageKey"); 5665 5666 final int webSocketID = 40015000 + counter++; 5667 final boolean[] optionals = { false, }; 5668 5669 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5670 String requestJSON = WriteJSON.get( 5671 parameterTypes.get("untrackIndexedDBForStorageKey"), 5672 parameterNames.get("untrackIndexedDBForStorageKey"), 5673 optionals, webSocketID, 5674 "Storage.untrackIndexedDBForStorageKey", 5675 storageKey 5676 ); 5677 5678 // This Remote Command does not have a Return-Value. 5679 return new Script<> 5680 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5681 } 5682 5683 /** 5684 * Returns the number of stored Trust Tokens per issuer for the 5685 * current browsing context. 5686 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5687 * 5688 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5689 * {@link Storage.TrustTokens}[]></CODE> 5690 * 5691 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5692 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5693 * {@link Storage.TrustTokens}[]></CODE> will be returned. 5694 * 5695 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5696 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5697 * may be retrieved.</I> 5698 * 5699 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5700 * <BR /><BR /><UL CLASS=JDUL> 5701 * <LI><CODE>{@link Storage.TrustTokens}[] (<B>tokens</B></CODE>) 5702 * <BR />- 5703 * </LI> 5704 * </UL> */ 5705 public static Script<String, JsonObject, Storage.TrustTokens[]> getTrustTokens() 5706 { 5707 final int webSocketID = 40016000 + counter++; 5708 final boolean[] optionals = new boolean[0]; 5709 5710 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5711 String requestJSON = WriteJSON.get( 5712 parameterTypes.get("getTrustTokens"), 5713 parameterNames.get("getTrustTokens"), 5714 optionals, webSocketID, 5715 "Storage.getTrustTokens" 5716 ); 5717 5718 // 'JSON Binding' ... Converts Browser Response-JSON to 'Storage.TrustTokens[]' 5719 Function<JsonObject, Storage.TrustTokens[]> responseProcessor = (JsonObject jo) -> 5720 (jo.getJsonArray("tokens") == null) 5721 ? null 5722 : RJArrIntoStream.objArr(jo.getJsonArray("tokens"), null, 0, Storage.TrustTokens.class).toArray(Storage.TrustTokens[]::new); 5723 5724 return new Script<>(webSocketID, requestJSON, responseProcessor); 5725 } 5726 5727 /** 5728 * Removes all Trust Tokens issued by the provided issuerOrigin. 5729 * Leaves other stored data, including the issuer's Redemption Records, intact. 5730 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5731 * 5732 * @param issuerOrigin - 5733 * 5734 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5735 * Boolean></CODE> 5736 * 5737 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5738 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5739 * Boolean></CODE> will be returned. 5740 * 5741 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5742 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5743 * may be retrieved.</I> 5744 * 5745 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5746 * <BR /><BR /><UL CLASS=JDUL> 5747 * <LI><CODE>Boolean (<B>didDeleteTokens</B></CODE>) 5748 * <BR />True if any tokens were deleted, false otherwise. 5749 * </LI> 5750 * </UL> */ 5751 public static Script<String, JsonObject, Boolean> clearTrustTokens(String issuerOrigin) 5752 { 5753 // Exception-Check(s) to ensure that if any parameters which are not declared as 5754 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5755 5756 if (issuerOrigin == null) THROWS.throwNPE("issuerOrigin"); 5757 5758 final int webSocketID = 40017000 + counter++; 5759 final boolean[] optionals = { false, }; 5760 5761 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5762 String requestJSON = WriteJSON.get( 5763 parameterTypes.get("clearTrustTokens"), 5764 parameterNames.get("clearTrustTokens"), 5765 optionals, webSocketID, 5766 "Storage.clearTrustTokens", 5767 issuerOrigin 5768 ); 5769 5770 // 'JSON Binding' ... Converts Browser Response-JSON to 'Boolean' 5771 Function<JsonObject, Boolean> responseProcessor = (JsonObject jo) -> 5772 ReadPrimJSON.getBoolean(jo, "didDeleteTokens"); 5773 5774 return new Script<>(webSocketID, requestJSON, responseProcessor); 5775 } 5776 5777 /** 5778 * Gets details for a named interest group. 5779 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5780 * 5781 * @param ownerOrigin - 5782 * 5783 * @param name - 5784 * 5785 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5786 * JsonObject></CODE> 5787 * 5788 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5789 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5790 * JsonObject></CODE> will be returned. 5791 * 5792 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5793 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5794 * may be retrieved.</I> 5795 * 5796 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5797 * <BR /><BR /><UL CLASS=JDUL> 5798 * <LI><CODE>JsonObject (<B>details</B></CODE>) 5799 * <BR />This largely corresponds to: 5800 * https://wicg.github.io/turtledove/#dictdef-generatebidinterestgroup 5801 * but has absolute expirationTime instead of relative lifetimeMs and 5802 * also adds joiningOrigin. 5803 * </LI> 5804 * </UL> */ 5805 public static Script<String, JsonObject, JsonObject> getInterestGroupDetails 5806 (String ownerOrigin, String name) 5807 { 5808 // Exception-Check(s) to ensure that if any parameters which are not declared as 5809 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5810 5811 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 5812 if (name == null) THROWS.throwNPE("name"); 5813 5814 final int webSocketID = 40018000 + counter++; 5815 final boolean[] optionals = { false, false, }; 5816 5817 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5818 String requestJSON = WriteJSON.get( 5819 parameterTypes.get("getInterestGroupDetails"), 5820 parameterNames.get("getInterestGroupDetails"), 5821 optionals, webSocketID, 5822 "Storage.getInterestGroupDetails", 5823 ownerOrigin, name 5824 ); 5825 5826 // 'JSON Binding' ... Converts Browser Response-JSON to 'JsonObject' 5827 Function<JsonObject, JsonObject> responseProcessor = (JsonObject jo) -> 5828 jo.getJsonObject("details"); 5829 5830 return new Script<>(webSocketID, requestJSON, responseProcessor); 5831 } 5832 5833 /** 5834 * Enables/Disables issuing of interestGroupAccessed events. 5835 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5836 * 5837 * @param enable - 5838 * 5839 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5840 * {@link Ret0}></CODE> 5841 * 5842 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5843 * browser receives the invocation-request. 5844 * 5845 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5846 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5847 * {@code >} to ensure the Browser Function has run to completion. 5848 */ 5849 public static Script<String, JsonObject, Ret0> setInterestGroupTracking(boolean enable) 5850 { 5851 final int webSocketID = 40019000 + counter++; 5852 final boolean[] optionals = { false, }; 5853 5854 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5855 String requestJSON = WriteJSON.get( 5856 parameterTypes.get("setInterestGroupTracking"), 5857 parameterNames.get("setInterestGroupTracking"), 5858 optionals, webSocketID, 5859 "Storage.setInterestGroupTracking", 5860 enable 5861 ); 5862 5863 // This Remote Command does not have a Return-Value. 5864 return new Script<> 5865 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5866 } 5867 5868 /** 5869 * Enables/Disables issuing of interestGroupAuctionEventOccurred and 5870 * interestGroupAuctionNetworkRequestCreated. 5871 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5872 * 5873 * @param enable - 5874 * 5875 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5876 * {@link Ret0}></CODE> 5877 * 5878 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 5879 * browser receives the invocation-request. 5880 * 5881 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 5882 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 5883 * {@code >} to ensure the Browser Function has run to completion. 5884 */ 5885 public static Script<String, JsonObject, Ret0> setInterestGroupAuctionTracking 5886 (boolean enable) 5887 { 5888 final int webSocketID = 40020000 + counter++; 5889 final boolean[] optionals = { false, }; 5890 5891 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5892 String requestJSON = WriteJSON.get( 5893 parameterTypes.get("setInterestGroupAuctionTracking"), 5894 parameterNames.get("setInterestGroupAuctionTracking"), 5895 optionals, webSocketID, 5896 "Storage.setInterestGroupAuctionTracking", 5897 enable 5898 ); 5899 5900 // This Remote Command does not have a Return-Value. 5901 return new Script<> 5902 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 5903 } 5904 5905 /** 5906 * Gets metadata for an origin's shared storage. 5907 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5908 * 5909 * @param ownerOrigin - 5910 * 5911 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5912 * {@link Storage.SharedStorageMetadata}></CODE> 5913 * 5914 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5915 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5916 * {@link Storage.SharedStorageMetadata}></CODE> will be returned. 5917 * 5918 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5919 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5920 * may be retrieved.</I> 5921 * 5922 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5923 * <BR /><BR /><UL CLASS=JDUL> 5924 * <LI><CODE>{@link Storage.SharedStorageMetadata} (<B>metadata</B></CODE>) 5925 * <BR />- 5926 * </LI> 5927 * </UL> */ 5928 public static Script<String, JsonObject, Storage.SharedStorageMetadata> getSharedStorageMetadata 5929 (String ownerOrigin) 5930 { 5931 // Exception-Check(s) to ensure that if any parameters which are not declared as 5932 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5933 5934 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 5935 5936 final int webSocketID = 40021000 + counter++; 5937 final boolean[] optionals = { false, }; 5938 5939 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5940 String requestJSON = WriteJSON.get( 5941 parameterTypes.get("getSharedStorageMetadata"), 5942 parameterNames.get("getSharedStorageMetadata"), 5943 optionals, webSocketID, 5944 "Storage.getSharedStorageMetadata", 5945 ownerOrigin 5946 ); 5947 5948 // 'JSON Binding' ... Converts Browser Response-JSON to 'Storage.SharedStorageMetadata' 5949 Function<JsonObject, Storage.SharedStorageMetadata> responseProcessor = (JsonObject jo) -> 5950 ReadJSON.getObject(jo, "metadata", Storage.SharedStorageMetadata.class, false, true); 5951 5952 return new Script<>(webSocketID, requestJSON, responseProcessor); 5953 } 5954 5955 /** 5956 * Gets the entries in an given origin's shared storage. 5957 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 5958 * 5959 * @param ownerOrigin - 5960 * 5961 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 5962 * {@link Storage.SharedStorageEntry}[]></CODE> 5963 * 5964 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 5965 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 5966 * {@link Storage.SharedStorageEntry}[]></CODE> will be returned. 5967 * 5968 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 5969 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 5970 * may be retrieved.</I> 5971 * 5972 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 5973 * <BR /><BR /><UL CLASS=JDUL> 5974 * <LI><CODE>{@link Storage.SharedStorageEntry}[] (<B>entries</B></CODE>) 5975 * <BR />- 5976 * </LI> 5977 * </UL> */ 5978 public static Script<String, JsonObject, Storage.SharedStorageEntry[]> getSharedStorageEntries 5979 (String ownerOrigin) 5980 { 5981 // Exception-Check(s) to ensure that if any parameters which are not declared as 5982 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 5983 5984 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 5985 5986 final int webSocketID = 40022000 + counter++; 5987 final boolean[] optionals = { false, }; 5988 5989 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 5990 String requestJSON = WriteJSON.get( 5991 parameterTypes.get("getSharedStorageEntries"), 5992 parameterNames.get("getSharedStorageEntries"), 5993 optionals, webSocketID, 5994 "Storage.getSharedStorageEntries", 5995 ownerOrigin 5996 ); 5997 5998 // 'JSON Binding' ... Converts Browser Response-JSON to 'Storage.SharedStorageEntry[]' 5999 Function<JsonObject, Storage.SharedStorageEntry[]> responseProcessor = (JsonObject jo) -> 6000 (jo.getJsonArray("entries") == null) 6001 ? null 6002 : RJArrIntoStream.objArr(jo.getJsonArray("entries"), null, 0, Storage.SharedStorageEntry.class).toArray(Storage.SharedStorageEntry[]::new); 6003 6004 return new Script<>(webSocketID, requestJSON, responseProcessor); 6005 } 6006 6007 /** 6008 * Sets entry with {@code key} and {@code value} for a given origin's shared storage. 6009 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6010 * 6011 * @param ownerOrigin - 6012 * 6013 * @param key - 6014 * 6015 * @param value - 6016 * 6017 * @param ignoreIfPresent 6018 * If {@code ignoreIfPresent} is included and true, then only sets the entry if 6019 * {@code key} doesn't already exist. 6020 * <BR /><B CLASS=Opt>OPTIONAL</B> 6021 * 6022 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6023 * {@link Ret0}></CODE> 6024 * 6025 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6026 * browser receives the invocation-request. 6027 * 6028 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6029 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6030 * {@code >} to ensure the Browser Function has run to completion. 6031 */ 6032 public static Script<String, JsonObject, Ret0> setSharedStorageEntry 6033 (String ownerOrigin, String key, String value, Boolean ignoreIfPresent) 6034 { 6035 // Exception-Check(s) to ensure that if any parameters which are not declared as 6036 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6037 6038 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 6039 if (key == null) THROWS.throwNPE("key"); 6040 if (value == null) THROWS.throwNPE("value"); 6041 6042 final int webSocketID = 40023000 + counter++; 6043 final boolean[] optionals = { false, false, false, true, }; 6044 6045 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6046 String requestJSON = WriteJSON.get( 6047 parameterTypes.get("setSharedStorageEntry"), 6048 parameterNames.get("setSharedStorageEntry"), 6049 optionals, webSocketID, 6050 "Storage.setSharedStorageEntry", 6051 ownerOrigin, key, value, ignoreIfPresent 6052 ); 6053 6054 // This Remote Command does not have a Return-Value. 6055 return new Script<> 6056 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6057 } 6058 6059 /** 6060 * Deletes entry for {@code key} (if it exists) for a given origin's shared storage. 6061 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6062 * 6063 * @param ownerOrigin - 6064 * 6065 * @param key - 6066 * 6067 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6068 * {@link Ret0}></CODE> 6069 * 6070 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6071 * browser receives the invocation-request. 6072 * 6073 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6074 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6075 * {@code >} to ensure the Browser Function has run to completion. 6076 */ 6077 public static Script<String, JsonObject, Ret0> deleteSharedStorageEntry 6078 (String ownerOrigin, String key) 6079 { 6080 // Exception-Check(s) to ensure that if any parameters which are not declared as 6081 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6082 6083 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 6084 if (key == null) THROWS.throwNPE("key"); 6085 6086 final int webSocketID = 40024000 + counter++; 6087 final boolean[] optionals = { false, false, }; 6088 6089 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6090 String requestJSON = WriteJSON.get( 6091 parameterTypes.get("deleteSharedStorageEntry"), 6092 parameterNames.get("deleteSharedStorageEntry"), 6093 optionals, webSocketID, 6094 "Storage.deleteSharedStorageEntry", 6095 ownerOrigin, key 6096 ); 6097 6098 // This Remote Command does not have a Return-Value. 6099 return new Script<> 6100 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6101 } 6102 6103 /** 6104 * Clears all entries for a given origin's shared storage. 6105 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6106 * 6107 * @param ownerOrigin - 6108 * 6109 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6110 * {@link Ret0}></CODE> 6111 * 6112 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6113 * browser receives the invocation-request. 6114 * 6115 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6116 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6117 * {@code >} to ensure the Browser Function has run to completion. 6118 */ 6119 public static Script<String, JsonObject, Ret0> clearSharedStorageEntries(String ownerOrigin) 6120 { 6121 // Exception-Check(s) to ensure that if any parameters which are not declared as 6122 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6123 6124 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 6125 6126 final int webSocketID = 40025000 + counter++; 6127 final boolean[] optionals = { false, }; 6128 6129 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6130 String requestJSON = WriteJSON.get( 6131 parameterTypes.get("clearSharedStorageEntries"), 6132 parameterNames.get("clearSharedStorageEntries"), 6133 optionals, webSocketID, 6134 "Storage.clearSharedStorageEntries", 6135 ownerOrigin 6136 ); 6137 6138 // This Remote Command does not have a Return-Value. 6139 return new Script<> 6140 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6141 } 6142 6143 /** 6144 * Resets the budget for {@code ownerOrigin} by clearing all budget withdrawals. 6145 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6146 * 6147 * @param ownerOrigin - 6148 * 6149 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6150 * {@link Ret0}></CODE> 6151 * 6152 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6153 * browser receives the invocation-request. 6154 * 6155 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6156 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6157 * {@code >} to ensure the Browser Function has run to completion. 6158 */ 6159 public static Script<String, JsonObject, Ret0> resetSharedStorageBudget(String ownerOrigin) 6160 { 6161 // Exception-Check(s) to ensure that if any parameters which are not declared as 6162 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6163 6164 if (ownerOrigin == null) THROWS.throwNPE("ownerOrigin"); 6165 6166 final int webSocketID = 40026000 + counter++; 6167 final boolean[] optionals = { false, }; 6168 6169 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6170 String requestJSON = WriteJSON.get( 6171 parameterTypes.get("resetSharedStorageBudget"), 6172 parameterNames.get("resetSharedStorageBudget"), 6173 optionals, webSocketID, 6174 "Storage.resetSharedStorageBudget", 6175 ownerOrigin 6176 ); 6177 6178 // This Remote Command does not have a Return-Value. 6179 return new Script<> 6180 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6181 } 6182 6183 /** 6184 * Enables/disables issuing of sharedStorageAccessed events. 6185 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6186 * 6187 * @param enable - 6188 * 6189 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6190 * {@link Ret0}></CODE> 6191 * 6192 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6193 * browser receives the invocation-request. 6194 * 6195 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6196 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6197 * {@code >} to ensure the Browser Function has run to completion. 6198 */ 6199 public static Script<String, JsonObject, Ret0> setSharedStorageTracking(boolean enable) 6200 { 6201 final int webSocketID = 40027000 + counter++; 6202 final boolean[] optionals = { false, }; 6203 6204 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6205 String requestJSON = WriteJSON.get( 6206 parameterTypes.get("setSharedStorageTracking"), 6207 parameterNames.get("setSharedStorageTracking"), 6208 optionals, webSocketID, 6209 "Storage.setSharedStorageTracking", 6210 enable 6211 ); 6212 6213 // This Remote Command does not have a Return-Value. 6214 return new Script<> 6215 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6216 } 6217 6218 /** 6219 * Set tracking for a storage key's buckets. 6220 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6221 * 6222 * @param storageKey - 6223 * 6224 * @param enable - 6225 * 6226 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6227 * {@link Ret0}></CODE> 6228 * 6229 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6230 * browser receives the invocation-request. 6231 * 6232 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6233 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6234 * {@code >} to ensure the Browser Function has run to completion. 6235 */ 6236 public static Script<String, JsonObject, Ret0> setStorageBucketTracking 6237 (String storageKey, boolean enable) 6238 { 6239 // Exception-Check(s) to ensure that if any parameters which are not declared as 6240 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6241 6242 if (storageKey == null) THROWS.throwNPE("storageKey"); 6243 6244 final int webSocketID = 40028000 + counter++; 6245 final boolean[] optionals = { false, false, }; 6246 6247 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6248 String requestJSON = WriteJSON.get( 6249 parameterTypes.get("setStorageBucketTracking"), 6250 parameterNames.get("setStorageBucketTracking"), 6251 optionals, webSocketID, 6252 "Storage.setStorageBucketTracking", 6253 storageKey, enable 6254 ); 6255 6256 // This Remote Command does not have a Return-Value. 6257 return new Script<> 6258 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6259 } 6260 6261 /** 6262 * Deletes the Storage Bucket with the given storage key and bucket name. 6263 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6264 * 6265 * @param bucket - 6266 * 6267 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6268 * {@link Ret0}></CODE> 6269 * 6270 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6271 * browser receives the invocation-request. 6272 * 6273 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6274 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6275 * {@code >} to ensure the Browser Function has run to completion. 6276 */ 6277 public static Script<String, JsonObject, Ret0> deleteStorageBucket 6278 (Storage.StorageBucket bucket) 6279 { 6280 // Exception-Check(s) to ensure that if any parameters which are not declared as 6281 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6282 6283 if (bucket == null) THROWS.throwNPE("bucket"); 6284 6285 final int webSocketID = 40029000 + counter++; 6286 final boolean[] optionals = { false, }; 6287 6288 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6289 String requestJSON = WriteJSON.get( 6290 parameterTypes.get("deleteStorageBucket"), 6291 parameterNames.get("deleteStorageBucket"), 6292 optionals, webSocketID, 6293 "Storage.deleteStorageBucket", 6294 bucket 6295 ); 6296 6297 // This Remote Command does not have a Return-Value. 6298 return new Script<> 6299 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6300 } 6301 6302 /** 6303 * Deletes state for sites identified as potential bounce trackers, immediately. 6304 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6305 * 6306 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6307 * String[]></CODE> 6308 * 6309 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 6310 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 6311 * String[]></CODE> will be returned. 6312 * 6313 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 6314 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 6315 * may be retrieved.</I> 6316 * 6317 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 6318 * <BR /><BR /><UL CLASS=JDUL> 6319 * <LI><CODE>String[] (<B>deletedSites</B></CODE>) 6320 * <BR />- 6321 * </LI> 6322 * </UL> */ 6323 public static Script<String, JsonObject, String[]> runBounceTrackingMitigations() 6324 { 6325 final int webSocketID = 40030000 + counter++; 6326 final boolean[] optionals = new boolean[0]; 6327 6328 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6329 String requestJSON = WriteJSON.get( 6330 parameterTypes.get("runBounceTrackingMitigations"), 6331 parameterNames.get("runBounceTrackingMitigations"), 6332 optionals, webSocketID, 6333 "Storage.runBounceTrackingMitigations" 6334 ); 6335 6336 // 'JSON Binding' ... Converts Browser Response-JSON to 'String[]' 6337 Function<JsonObject, String[]> responseProcessor = (JsonObject jo) -> 6338 (jo.getJsonArray("deletedSites") == null) 6339 ? null 6340 : RJArrIntoStream.strArr(jo.getJsonArray("deletedSites"), null, 0).toArray(String[]::new); 6341 6342 return new Script<>(webSocketID, requestJSON, responseProcessor); 6343 } 6344 6345 /** 6346 * https://wicg.github.io/attribution-reporting-api/ 6347 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6348 * 6349 * @param enabled If enabled, noise is suppressed and reports are sent immediately. 6350 * 6351 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6352 * {@link Ret0}></CODE> 6353 * 6354 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6355 * browser receives the invocation-request. 6356 * 6357 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6358 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6359 * {@code >} to ensure the Browser Function has run to completion. 6360 */ 6361 public static Script<String, JsonObject, Ret0> setAttributionReportingLocalTestingMode 6362 (boolean enabled) 6363 { 6364 final int webSocketID = 40031000 + counter++; 6365 final boolean[] optionals = { false, }; 6366 6367 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6368 String requestJSON = WriteJSON.get( 6369 parameterTypes.get("setAttributionReportingLocalTestingMode"), 6370 parameterNames.get("setAttributionReportingLocalTestingMode"), 6371 optionals, webSocketID, 6372 "Storage.setAttributionReportingLocalTestingMode", 6373 enabled 6374 ); 6375 6376 // This Remote Command does not have a Return-Value. 6377 return new Script<> 6378 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6379 } 6380 6381 /** 6382 * Enables/disables issuing of Attribution Reporting events. 6383 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6384 * 6385 * @param enable - 6386 * 6387 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6388 * {@link Ret0}></CODE> 6389 * 6390 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6391 * browser receives the invocation-request. 6392 * 6393 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6394 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6395 * {@code >} to ensure the Browser Function has run to completion. 6396 */ 6397 public static Script<String, JsonObject, Ret0> setAttributionReportingTracking 6398 (boolean enable) 6399 { 6400 final int webSocketID = 40032000 + counter++; 6401 final boolean[] optionals = { false, }; 6402 6403 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6404 String requestJSON = WriteJSON.get( 6405 parameterTypes.get("setAttributionReportingTracking"), 6406 parameterNames.get("setAttributionReportingTracking"), 6407 optionals, webSocketID, 6408 "Storage.setAttributionReportingTracking", 6409 enable 6410 ); 6411 6412 // This Remote Command does not have a Return-Value. 6413 return new Script<> 6414 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6415 } 6416 6417 /** 6418 * Sends all pending Attribution Reports immediately, regardless of their 6419 * scheduled report time. 6420 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6421 * 6422 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6423 * Integer></CODE> 6424 * 6425 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 6426 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 6427 * Integer></CODE> will be returned. 6428 * 6429 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 6430 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 6431 * may be retrieved.</I> 6432 * 6433 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 6434 * <BR /><BR /><UL CLASS=JDUL> 6435 * <LI><CODE>Integer (<B>numSent</B></CODE>) 6436 * <BR />The number of reports that were sent. 6437 * </LI> 6438 * </UL> */ 6439 public static Script<String, JsonObject, Integer> sendPendingAttributionReports() 6440 { 6441 final int webSocketID = 40033000 + counter++; 6442 final boolean[] optionals = new boolean[0]; 6443 6444 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6445 String requestJSON = WriteJSON.get( 6446 parameterTypes.get("sendPendingAttributionReports"), 6447 parameterNames.get("sendPendingAttributionReports"), 6448 optionals, webSocketID, 6449 "Storage.sendPendingAttributionReports" 6450 ); 6451 6452 // 'JSON Binding' ... Converts Browser Response-JSON to 'Integer' 6453 Function<JsonObject, Integer> responseProcessor = (JsonObject jo) -> 6454 ReadPrimJSON.getInt(jo, "numSent"); 6455 6456 return new Script<>(webSocketID, requestJSON, responseProcessor); 6457 } 6458 6459 /** 6460 * Returns the effective Related Website Sets in use by this profile for the browser 6461 * session. The effective Related Website Sets will not change during a browser session. 6462 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6463 * 6464 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6465 * {@link Storage.RelatedWebsiteSet}[]></CODE> 6466 * 6467 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 6468 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 6469 * {@link Storage.RelatedWebsiteSet}[]></CODE> will be returned. 6470 * 6471 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 6472 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 6473 * may be retrieved.</I> 6474 * 6475 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 6476 * <BR /><BR /><UL CLASS=JDUL> 6477 * <LI><CODE>{@link Storage.RelatedWebsiteSet}[] (<B>sets</B></CODE>) 6478 * <BR />- 6479 * </LI> 6480 * </UL> */ 6481 public static Script<String, JsonObject, Storage.RelatedWebsiteSet[]> getRelatedWebsiteSets() 6482 { 6483 final int webSocketID = 40034000 + counter++; 6484 final boolean[] optionals = new boolean[0]; 6485 6486 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6487 String requestJSON = WriteJSON.get( 6488 parameterTypes.get("getRelatedWebsiteSets"), 6489 parameterNames.get("getRelatedWebsiteSets"), 6490 optionals, webSocketID, 6491 "Storage.getRelatedWebsiteSets" 6492 ); 6493 6494 // 'JSON Binding' ... Converts Browser Response-JSON to 'Storage.RelatedWebsiteSet[]' 6495 Function<JsonObject, Storage.RelatedWebsiteSet[]> responseProcessor = (JsonObject jo) -> 6496 (jo.getJsonArray("sets") == null) 6497 ? null 6498 : RJArrIntoStream.objArr(jo.getJsonArray("sets"), null, 0, Storage.RelatedWebsiteSet.class).toArray(Storage.RelatedWebsiteSet[]::new); 6499 6500 return new Script<>(webSocketID, requestJSON, responseProcessor); 6501 } 6502 6503 /** 6504 * Returns the list of URLs from a page and its embedded resources that match 6505 * existing grace period URL pattern rules. 6506 * https://developers.google.com/privacy-sandbox/cookies/temporary-exceptions/grace-period 6507 * <BR /><B CLASS=Exp-Top>EXPERIMENTAL</B> 6508 * 6509 * @param firstPartyUrl The URL of the page currently being visited. 6510 * 6511 * @param thirdPartyUrls The list of embedded resource URLs from the page. 6512 * 6513 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6514 * String[]></CODE> 6515 * 6516 * <BR /><BR />This <B>script</B> may be <B STYLE='color: red'>executed</B>, using 6517 * {@link Script#exec()}, and afterwards, a {@link Promise}<CODE><JsonObject, 6518 * String[]></CODE> will be returned. 6519 * 6520 * <BR /><BR />Finally, the <B>{@code Promise}</B> may be <B STYLE='color: red'>awaited</B>, 6521 * using {@link Promise#await()}, <I>and the returned result of this Browser Function may 6522 * may be retrieved.</I> 6523 * 6524 * <BR /><BR />This Browser Function <B STYLE='color: red'>returns</B> 6525 * <BR /><BR /><UL CLASS=JDUL> 6526 * <LI><CODE>String[] (<B>matchedUrls</B></CODE>) 6527 * <BR />Array of matching URLs. If there is a primary pattern match for the first- 6528 * party URL, only the first-party URL is returned in the array. 6529 * </LI> 6530 * </UL> */ 6531 public static Script<String, JsonObject, String[]> getAffectedUrlsForThirdPartyCookieMetadata 6532 (String firstPartyUrl, String[] thirdPartyUrls) 6533 { 6534 // Exception-Check(s) to ensure that if any parameters which are not declared as 6535 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6536 6537 if (firstPartyUrl == null) THROWS.throwNPE("firstPartyUrl"); 6538 if (thirdPartyUrls == null) THROWS.throwNPE("thirdPartyUrls"); 6539 6540 final int webSocketID = 40035000 + counter++; 6541 final boolean[] optionals = { false, false, }; 6542 6543 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6544 String requestJSON = WriteJSON.get( 6545 parameterTypes.get("getAffectedUrlsForThirdPartyCookieMetadata"), 6546 parameterNames.get("getAffectedUrlsForThirdPartyCookieMetadata"), 6547 optionals, webSocketID, 6548 "Storage.getAffectedUrlsForThirdPartyCookieMetadata", 6549 firstPartyUrl, thirdPartyUrls 6550 ); 6551 6552 // 'JSON Binding' ... Converts Browser Response-JSON to 'String[]' 6553 Function<JsonObject, String[]> responseProcessor = (JsonObject jo) -> 6554 (jo.getJsonArray("matchedUrls") == null) 6555 ? null 6556 : RJArrIntoStream.strArr(jo.getJsonArray("matchedUrls"), null, 0).toArray(String[]::new); 6557 6558 return new Script<>(webSocketID, requestJSON, responseProcessor); 6559 } 6560 6561 /** 6562 * <CODE>[No Description Provided by Google]</CODE> 6563 * 6564 * @param owner - 6565 * 6566 * @param name - 6567 * 6568 * @param hashes - 6569 * 6570 * @return An instance of <CODE>{@link Script}<String, {@link JsonObject}, 6571 * {@link Ret0}></CODE> 6572 * 6573 * <BR /><BR />This {@code Script} instance must be <B STYLE='color:red'>executed</B> before the 6574 * browser receives the invocation-request. 6575 * 6576 * <BR /><BR />This Browser-Function <I>does not have</I> a return-value. You may choose to 6577 * <B STYLE='color: red'>await</B> the {@link Promise}{@code <JsonObject,} {@link Ret0} 6578 * {@code >} to ensure the Browser Function has run to completion. 6579 */ 6580 public static Script<String, JsonObject, Ret0> setProtectedAudienceKAnonymity 6581 (String owner, String name, String[] hashes) 6582 { 6583 // Exception-Check(s) to ensure that if any parameters which are not declared as 6584 // 'Optional', but have a 'null' value anyway, that a NullPointerException shall throw. 6585 6586 if (owner == null) THROWS.throwNPE("owner"); 6587 if (name == null) THROWS.throwNPE("name"); 6588 if (hashes == null) THROWS.throwNPE("hashes"); 6589 6590 final int webSocketID = 40036000 + counter++; 6591 final boolean[] optionals = { false, false, false, }; 6592 6593 // Convert Method Parameters into JSON. Build the JSON Request-Object (as a String) 6594 String requestJSON = WriteJSON.get( 6595 parameterTypes.get("setProtectedAudienceKAnonymity"), 6596 parameterNames.get("setProtectedAudienceKAnonymity"), 6597 optionals, webSocketID, 6598 "Storage.setProtectedAudienceKAnonymity", 6599 owner, name, hashes 6600 ); 6601 6602 // This Remote Command does not have a Return-Value. 6603 return new Script<> 6604 (webSocketID, requestJSON, VOID_RETURN.NoReturnValues); 6605 } 6606 6607}