|
| 1 | +// Copyright (c) 2024 Apple Inc. Licensed under MIT License. |
| 2 | + |
| 3 | +package com.apple.itunes.storekit.model; |
| 4 | + |
| 5 | +import com.fasterxml.jackson.annotation.JsonAnySetter; |
| 6 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 7 | + |
| 8 | +import java.util.Map; |
| 9 | +import java.util.Objects; |
| 10 | + |
| 11 | +/** |
| 12 | + * The payload data that contains an external purchase token. |
| 13 | + * |
| 14 | + * @see <a href="https://developer.apple.com/documentation/appstoreservernotifications/externalpurchasetoken">externalPurchaseToken</a> |
| 15 | + */ |
| 16 | +public class ExternalPurchaseToken { |
| 17 | + private static final String SERIALIZED_NAME_EXTERNAL_PURCHASE_ID = "externalPurchaseId"; |
| 18 | + private static final String SERIALIZED_NAME_TOKEN_CREATION_DATE = "tokenCreationDate"; |
| 19 | + private static final String SERIALIZED_NAME_APP_APPLE_ID = "appAppleId"; |
| 20 | + private static final String SERIALIZED_NAME_BUNDLE_ID = "bundleId"; |
| 21 | + @JsonProperty(SERIALIZED_NAME_EXTERNAL_PURCHASE_ID) |
| 22 | + private String externalPurchaseId; |
| 23 | + @JsonProperty(SERIALIZED_NAME_TOKEN_CREATION_DATE) |
| 24 | + private Long tokenCreationDate; |
| 25 | + @JsonProperty(SERIALIZED_NAME_APP_APPLE_ID) |
| 26 | + private Long appAppleId; |
| 27 | + @JsonProperty(SERIALIZED_NAME_BUNDLE_ID) |
| 28 | + private String bundleId; |
| 29 | + @JsonAnySetter |
| 30 | + private Map<String, Object> unknownFields; |
| 31 | + |
| 32 | + public ExternalPurchaseToken() { |
| 33 | + } |
| 34 | + |
| 35 | + public ExternalPurchaseToken externalPurchaseId(String externalPurchaseId) { |
| 36 | + this.externalPurchaseId = externalPurchaseId; |
| 37 | + return this; |
| 38 | + } |
| 39 | + |
| 40 | + /** |
| 41 | + * The field of an external purchase token that uniquely identifies the token. |
| 42 | + * |
| 43 | + * @return externalPurchaseId |
| 44 | + * @see <a href="https://developer.apple.com/documentation/appstoreservernotifications/externalpurchaseid">externalPurchaseId</a> |
| 45 | + **/ |
| 46 | + public String getExternalPurchaseId() { |
| 47 | + return externalPurchaseId; |
| 48 | + } |
| 49 | + |
| 50 | + public void setExternalPurchaseId(String externalPurchaseId) { |
| 51 | + this.externalPurchaseId = externalPurchaseId; |
| 52 | + } |
| 53 | + |
| 54 | + public ExternalPurchaseToken tokenCreationDate(Long tokenCreationDate) { |
| 55 | + this.tokenCreationDate = tokenCreationDate; |
| 56 | + return this; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * The field of an external purchase token that contains the UNIX date, in milliseconds, when the system created the token. |
| 61 | + * |
| 62 | + * @return tokenCreationDate |
| 63 | + * @see <a href="https://developer.apple.com/documentation/appstoreservernotifications/tokencreationdate">tokenCreationDate</a> |
| 64 | + **/ |
| 65 | + public Long getTokenCreationDate() { |
| 66 | + return tokenCreationDate; |
| 67 | + } |
| 68 | + |
| 69 | + public void setTokenCreationDate(Long tokenCreationDate) { |
| 70 | + this.tokenCreationDate = tokenCreationDate; |
| 71 | + } |
| 72 | + |
| 73 | + public ExternalPurchaseToken appAppleId(Long appAppleId) { |
| 74 | + this.appAppleId = appAppleId; |
| 75 | + return this; |
| 76 | + } |
| 77 | + |
| 78 | + /** |
| 79 | + * The unique identifier of an app in the App Store. |
| 80 | + * |
| 81 | + * @return appAppleId |
| 82 | + * @see <a href="https://developer.apple.com/documentation/appstoreservernotifications/appappleid">appAppleId</a> |
| 83 | + **/ |
| 84 | + public Long getAppAppleId() { |
| 85 | + return appAppleId; |
| 86 | + } |
| 87 | + |
| 88 | + public void setAppAppleId(Long appAppleId) { |
| 89 | + this.appAppleId = appAppleId; |
| 90 | + } |
| 91 | + |
| 92 | + public ExternalPurchaseToken bundleId(String bundleId) { |
| 93 | + this.bundleId = bundleId; |
| 94 | + return this; |
| 95 | + } |
| 96 | + |
| 97 | + /** |
| 98 | + * The bundle identifier of an app. |
| 99 | + * |
| 100 | + * @return bundleId |
| 101 | + * @see <a href="https://developer.apple.com/documentation/appstoreservernotifications/bundleid">bundleId</a> |
| 102 | + **/ |
| 103 | + public String getBundleId() { |
| 104 | + return bundleId; |
| 105 | + } |
| 106 | + |
| 107 | + public void setBundleId(String bundleId) { |
| 108 | + this.bundleId = bundleId; |
| 109 | + } |
| 110 | + |
| 111 | + public ExternalPurchaseToken unknownFields(Map<String, Object> unknownFields) { |
| 112 | + this.unknownFields = unknownFields; |
| 113 | + return this; |
| 114 | + } |
| 115 | + |
| 116 | + /** |
| 117 | + Fields that are not recognized for this object |
| 118 | +
|
| 119 | + @return A map of JSON keys to objects |
| 120 | + */ |
| 121 | + public Map<String, Object> getUnknownFields() { |
| 122 | + return unknownFields; |
| 123 | + } |
| 124 | + |
| 125 | + public void setUnknownFields(Map<String, Object> unknownFields) { |
| 126 | + this.unknownFields = unknownFields; |
| 127 | + } |
| 128 | + |
| 129 | + @Override |
| 130 | + public boolean equals(Object o) { |
| 131 | + if (this == o) { |
| 132 | + return true; |
| 133 | + } |
| 134 | + if (o == null || getClass() != o.getClass()) { |
| 135 | + return false; |
| 136 | + } |
| 137 | + ExternalPurchaseToken externalPurchaseToken = (ExternalPurchaseToken) o; |
| 138 | + return Objects.equals(this.externalPurchaseId, externalPurchaseToken.externalPurchaseId) && |
| 139 | + Objects.equals(this.tokenCreationDate, externalPurchaseToken.tokenCreationDate) && |
| 140 | + Objects.equals(this.appAppleId, externalPurchaseToken.appAppleId) && |
| 141 | + Objects.equals(this.bundleId, externalPurchaseToken.bundleId) && |
| 142 | + Objects.equals(this.unknownFields, externalPurchaseToken.unknownFields); |
| 143 | + } |
| 144 | + |
| 145 | + @Override |
| 146 | + public int hashCode() { |
| 147 | + return Objects.hash(externalPurchaseId, tokenCreationDate, appAppleId, bundleId, unknownFields); |
| 148 | + } |
| 149 | + |
| 150 | + @Override |
| 151 | + public String toString() { |
| 152 | + return "ExternalPurchaseToken{" + |
| 153 | + "externalPurchaseId='" + externalPurchaseId + '\'' + |
| 154 | + ", tokenCreationDate=" + tokenCreationDate + |
| 155 | + ", appAppleId=" + appAppleId + |
| 156 | + ", bundleId='" + bundleId + '\'' + |
| 157 | + ", unknownFields=" + unknownFields + |
| 158 | + '}'; |
| 159 | + } |
| 160 | +} |
| 161 | + |
0 commit comments