001// Generated by delombok at Mon Oct 20 21:18:35 UTC 2025 002/* 003 * Copyright (c) 2010-2025 Mark Allen, Norbert Bartels. 004 * 005 * Permission is hereby granted, free of charge, to any person obtaining a copy 006 * of this software and associated documentation files (the "Software"), to deal 007 * in the Software without restriction, including without limitation the rights 008 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 009 * copies of the Software, and to permit persons to whom the Software is 010 * furnished to do so, subject to the following conditions: 011 * 012 * The above copyright notice and this permission notice shall be included in 013 * all copies or substantial portions of the Software. 014 * 015 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 016 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 017 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 018 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 019 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 020 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 021 * THE SOFTWARE. 022 */ 023package com.restfb.types.instagram; 024 025import java.util.ArrayList; 026import java.util.Collections; 027import java.util.List; 028import com.restfb.Connection; 029import com.restfb.Facebook; 030import com.restfb.types.Insight; 031import com.restfb.types.NamedFacebookType; 032 033/** 034 * Represents the <a href="https://developers.facebook.com/docs/instagram-api/reference/user/">instagram user</a> type 035 * used in the Graph API 036 * and contains additional fields for the instagram API with instagram login User object 037 */ 038public class IgUser extends NamedFacebookType { 039 private static final long serialVersionUID = 1L; 040 /** 041 * Descriptive text for images, for accessibility. 042 */ 043 @Facebook("alt_text") 044 private String altText; 045 /** 046 * Biography of the user 047 */ 048 @Facebook 049 private String biography; 050 /** 051 * Loads business discovery information 052 */ 053 @Facebook("business_discovery") 054 private IgUser businessDiscovery; 055 /** 056 * Active follower count of the user 057 */ 058 @Facebook("followers_count") 059 private Long followersCount; 060 /** 061 * Active follows count of the user 062 */ 063 @Facebook("follows_count") 064 private Long followsCount; 065 /** 066 * Indicates whether your app user's Instagram professional 067 * account has a profile picture. 068 */ 069 @Facebook("has_profile_pic") 070 private Boolean hasProfilePic; 071 /** 072 * Ig Id of the user 073 */ 074 @Facebook("ig_id") 075 private Long igId; 076 /** 077 * Indicates whether your app user's Instagram account is published. 078 * Available for Page-backed Instagram accounts. 079 */ 080 @Facebook("is_published") 081 private Boolean isPublished; 082 /** 083 * Instagram Id of the Instagram API with Instagram login user 084 */ 085 @Facebook("user_id") 086 private Long userId; 087 /** 088 * Filtered media count of the user 089 */ 090 @Facebook("media_count") 091 private Long mediaCount; 092 /** 093 * The app user's account type. 094 * Can be Business or Media_Creator 095 */ 096 @Facebook("account_type") 097 private String accountType; 098 /** 099 * Your app user's Instagram ID that was created for Marketing API 100 * endpoints for v21.0 and older. Available for Page-backed Instagram accounts. 101 */ 102 @Facebook("legacy_instagram_user_id") 103 private String legacyInstagramUserId; 104 /** 105 * The cdn url to query the raw profile picture of the user 106 */ 107 @Facebook("profile_picture_url") 108 private String profilePictureUrl; 109 /** 110 * Returns true if your app user has set up an Instagram 111 * Shop and is therefore eligible for product tagging, otherwise returns false. 112 */ 113 @Facebook("shopping_product_tag_eligibility") 114 private Boolean shoppingProductTagEligibility; 115 /** 116 * Username handle of the user 117 */ 118 @Facebook 119 private String username; 120 /** 121 * Url in the profile 122 */ 123 @Facebook 124 private String website; 125 @Facebook 126 private List<Insight> insights = new ArrayList<>(); 127 @Deprecated 128 @Facebook 129 private List<IgMedia> media = new ArrayList<>(); 130 @Facebook("media") 131 private Connection<IgMedia> mediaConnection; 132 133 public Connection<IgMedia> getMediaConnection() { 134 return mediaConnection; 135 } 136 137 @Facebook("connected_threads_user") 138 private Connection<IgUserConnectedThreadsUser> connectedThreadsUser; 139 140 public List<Insight> getInsights() { 141 return Collections.unmodifiableList(insights); 142 } 143 144 public boolean addChild(Insight insight) { 145 return insights.add(insight); 146 } 147 148 public boolean removeChild(Insight insight) { 149 return insights.remove(insight); 150 } 151 152 @Deprecated 153 public List<IgMedia> getMedia() { 154 return Collections.unmodifiableList(media); 155 } 156 157 @Deprecated 158 public boolean addMedia(IgMedia media) { 159 return this.media.add(media); 160 } 161 162 @Deprecated 163 public boolean removeMedia(IgMedia media) { 164 return this.media.remove(media); 165 } 166 167 /** 168 * will be removed in 2026. the ID structure between 169 * Instagram user fetched with Instagram Login and Facebook API are too different 170 * @return some ID 171 */ 172 @Deprecated 173 public Long getInstagramId() { 174 if (userId != null) { 175 return userId; 176 } 177 if (igId != null) { 178 return igId; 179 } 180 return null; 181 } 182 183 /** 184 * Descriptive text for images, for accessibility. 185 */ 186 @java.lang.SuppressWarnings("all") 187 public String getAltText() { 188 return this.altText; 189 } 190 191 /** 192 * Descriptive text for images, for accessibility. 193 */ 194 @java.lang.SuppressWarnings("all") 195 public void setAltText(final String altText) { 196 this.altText = altText; 197 } 198 199 /** 200 * Biography of the user 201 */ 202 @java.lang.SuppressWarnings("all") 203 public String getBiography() { 204 return this.biography; 205 } 206 207 /** 208 * Biography of the user 209 */ 210 @java.lang.SuppressWarnings("all") 211 public void setBiography(final String biography) { 212 this.biography = biography; 213 } 214 215 /** 216 * Loads business discovery information 217 */ 218 @java.lang.SuppressWarnings("all") 219 public IgUser getBusinessDiscovery() { 220 return this.businessDiscovery; 221 } 222 223 /** 224 * Loads business discovery information 225 */ 226 @java.lang.SuppressWarnings("all") 227 public void setBusinessDiscovery(final IgUser businessDiscovery) { 228 this.businessDiscovery = businessDiscovery; 229 } 230 231 /** 232 * Active follower count of the user 233 */ 234 @java.lang.SuppressWarnings("all") 235 public Long getFollowersCount() { 236 return this.followersCount; 237 } 238 239 /** 240 * Active follower count of the user 241 */ 242 @java.lang.SuppressWarnings("all") 243 public void setFollowersCount(final Long followersCount) { 244 this.followersCount = followersCount; 245 } 246 247 /** 248 * Active follows count of the user 249 */ 250 @java.lang.SuppressWarnings("all") 251 public Long getFollowsCount() { 252 return this.followsCount; 253 } 254 255 /** 256 * Active follows count of the user 257 */ 258 @java.lang.SuppressWarnings("all") 259 public void setFollowsCount(final Long followsCount) { 260 this.followsCount = followsCount; 261 } 262 263 /** 264 * Indicates whether your app user's Instagram professional 265 * account has a profile picture. 266 */ 267 @java.lang.SuppressWarnings("all") 268 public Boolean getHasProfilePic() { 269 return this.hasProfilePic; 270 } 271 272 /** 273 * Indicates whether your app user's Instagram professional 274 * account has a profile picture. 275 */ 276 @java.lang.SuppressWarnings("all") 277 public void setHasProfilePic(final Boolean hasProfilePic) { 278 this.hasProfilePic = hasProfilePic; 279 } 280 281 /** 282 * Ig Id of the user 283 */ 284 @java.lang.SuppressWarnings("all") 285 public Long getIgId() { 286 return this.igId; 287 } 288 289 /** 290 * Ig Id of the user 291 */ 292 @java.lang.SuppressWarnings("all") 293 public void setIgId(final Long igId) { 294 this.igId = igId; 295 } 296 297 /** 298 * Indicates whether your app user's Instagram account is published. 299 * Available for Page-backed Instagram accounts. 300 */ 301 @java.lang.SuppressWarnings("all") 302 public Boolean getIsPublished() { 303 return this.isPublished; 304 } 305 306 /** 307 * Indicates whether your app user's Instagram account is published. 308 * Available for Page-backed Instagram accounts. 309 */ 310 @java.lang.SuppressWarnings("all") 311 public void setIsPublished(final Boolean isPublished) { 312 this.isPublished = isPublished; 313 } 314 315 /** 316 * Instagram Id of the Instagram API with Instagram login user 317 */ 318 @java.lang.SuppressWarnings("all") 319 public Long getUserId() { 320 return this.userId; 321 } 322 323 /** 324 * Instagram Id of the Instagram API with Instagram login user 325 */ 326 @java.lang.SuppressWarnings("all") 327 public void setUserId(final Long userId) { 328 this.userId = userId; 329 } 330 331 /** 332 * Filtered media count of the user 333 */ 334 @java.lang.SuppressWarnings("all") 335 public Long getMediaCount() { 336 return this.mediaCount; 337 } 338 339 /** 340 * Filtered media count of the user 341 */ 342 @java.lang.SuppressWarnings("all") 343 public void setMediaCount(final Long mediaCount) { 344 this.mediaCount = mediaCount; 345 } 346 347 /** 348 * The app user's account type. 349 * Can be Business or Media_Creator 350 */ 351 @java.lang.SuppressWarnings("all") 352 public String getAccountType() { 353 return this.accountType; 354 } 355 356 /** 357 * The app user's account type. 358 * Can be Business or Media_Creator 359 */ 360 @java.lang.SuppressWarnings("all") 361 public void setAccountType(final String accountType) { 362 this.accountType = accountType; 363 } 364 365 /** 366 * Your app user's Instagram ID that was created for Marketing API 367 * endpoints for v21.0 and older. Available for Page-backed Instagram accounts. 368 */ 369 @java.lang.SuppressWarnings("all") 370 public String getLegacyInstagramUserId() { 371 return this.legacyInstagramUserId; 372 } 373 374 /** 375 * Your app user's Instagram ID that was created for Marketing API 376 * endpoints for v21.0 and older. Available for Page-backed Instagram accounts. 377 */ 378 @java.lang.SuppressWarnings("all") 379 public void setLegacyInstagramUserId(final String legacyInstagramUserId) { 380 this.legacyInstagramUserId = legacyInstagramUserId; 381 } 382 383 /** 384 * The cdn url to query the raw profile picture of the user 385 */ 386 @java.lang.SuppressWarnings("all") 387 public String getProfilePictureUrl() { 388 return this.profilePictureUrl; 389 } 390 391 /** 392 * The cdn url to query the raw profile picture of the user 393 */ 394 @java.lang.SuppressWarnings("all") 395 public void setProfilePictureUrl(final String profilePictureUrl) { 396 this.profilePictureUrl = profilePictureUrl; 397 } 398 399 /** 400 * Returns true if your app user has set up an Instagram 401 * Shop and is therefore eligible for product tagging, otherwise returns false. 402 */ 403 @java.lang.SuppressWarnings("all") 404 public Boolean getShoppingProductTagEligibility() { 405 return this.shoppingProductTagEligibility; 406 } 407 408 /** 409 * Returns true if your app user has set up an Instagram 410 * Shop and is therefore eligible for product tagging, otherwise returns false. 411 */ 412 @java.lang.SuppressWarnings("all") 413 public void setShoppingProductTagEligibility(final Boolean shoppingProductTagEligibility) { 414 this.shoppingProductTagEligibility = shoppingProductTagEligibility; 415 } 416 417 /** 418 * Username handle of the user 419 */ 420 @java.lang.SuppressWarnings("all") 421 public String getUsername() { 422 return this.username; 423 } 424 425 /** 426 * Username handle of the user 427 */ 428 @java.lang.SuppressWarnings("all") 429 public void setUsername(final String username) { 430 this.username = username; 431 } 432 433 /** 434 * Url in the profile 435 */ 436 @java.lang.SuppressWarnings("all") 437 public String getWebsite() { 438 return this.website; 439 } 440 441 /** 442 * Url in the profile 443 */ 444 @java.lang.SuppressWarnings("all") 445 public void setWebsite(final String website) { 446 this.website = website; 447 } 448 449 @java.lang.SuppressWarnings("all") 450 public Connection<IgUserConnectedThreadsUser> getConnectedThreadsUser() { 451 return this.connectedThreadsUser; 452 } 453}