001// Generated by delombok at Sun Apr 14 14:59:49 CEST 2024
002/*
003 * Copyright (c) 2010-2024 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 */
037public class IgUser extends NamedFacebookType {
038  private static final long serialVersionUID = 1L;
039  /**
040   * Biography of the user
041   */
042  @Facebook
043  private String biography;
044  /**
045   * Loads business discovery information
046   */
047  @Facebook("business_discovery")
048  private IgUser businessDiscovery;
049  /**
050   * Active follower count of the user
051   */
052  @Facebook("followers_count")
053  private Long followersCount;
054  /**
055   * Active follows count of the user
056   */
057  @Facebook("follows_count")
058  private Long followsCount;
059  /**
060   * Ig Id of the user
061   */
062  @Facebook("ig_id")
063  private Long igId;
064  /**
065   * Filtered media count of the user
066   */
067  @Facebook("media_count")
068  private Long mediaCount;
069  /**
070   * The cdn url to query the raw profile picture of the user
071   */
072  @Facebook("profile_picture_url")
073  private String profilePictureUrl;
074  /**
075   * Username handle of the user
076   */
077  @Facebook
078  private String username;
079  /**
080   * Url in the profile
081   */
082  @Facebook
083  private String website;
084  @Facebook
085  private List<Insight> insights = new ArrayList<>();
086  @Deprecated
087  @Facebook
088  private List<IgMedia> media = new ArrayList<>();
089  @Facebook("media")
090  private Connection<IgMedia> mediaConnection;
091
092  public Connection<IgMedia> getMediaConnection() {
093    return mediaConnection;
094  }
095
096  public List<Insight> getInsights() {
097    return Collections.unmodifiableList(insights);
098  }
099
100  public boolean addChild(Insight insight) {
101    return insights.add(insight);
102  }
103
104  public boolean removeChild(Insight insight) {
105    return insights.remove(insight);
106  }
107
108  @Deprecated
109  public List<IgMedia> getMedia() {
110    return Collections.unmodifiableList(media);
111  }
112
113  @Deprecated
114  public boolean addMedia(IgMedia media) {
115    return this.media.add(media);
116  }
117
118  @Deprecated
119  public boolean removeMedia(IgMedia media) {
120    return this.media.remove(media);
121  }
122
123  /**
124   * Biography of the user
125   */
126  @java.lang.SuppressWarnings("all")
127  public String getBiography() {
128    return this.biography;
129  }
130
131  /**
132   * Biography of the user
133   */
134  @java.lang.SuppressWarnings("all")
135  public void setBiography(final String biography) {
136    this.biography = biography;
137  }
138
139  /**
140   * Loads business discovery information
141   */
142  @java.lang.SuppressWarnings("all")
143  public IgUser getBusinessDiscovery() {
144    return this.businessDiscovery;
145  }
146
147  /**
148   * Loads business discovery information
149   */
150  @java.lang.SuppressWarnings("all")
151  public void setBusinessDiscovery(final IgUser businessDiscovery) {
152    this.businessDiscovery = businessDiscovery;
153  }
154
155  /**
156   * Active follower count of the user
157   */
158  @java.lang.SuppressWarnings("all")
159  public Long getFollowersCount() {
160    return this.followersCount;
161  }
162
163  /**
164   * Active follower count of the user
165   */
166  @java.lang.SuppressWarnings("all")
167  public void setFollowersCount(final Long followersCount) {
168    this.followersCount = followersCount;
169  }
170
171  /**
172   * Active follows count of the user
173   */
174  @java.lang.SuppressWarnings("all")
175  public Long getFollowsCount() {
176    return this.followsCount;
177  }
178
179  /**
180   * Active follows count of the user
181   */
182  @java.lang.SuppressWarnings("all")
183  public void setFollowsCount(final Long followsCount) {
184    this.followsCount = followsCount;
185  }
186
187  /**
188   * Ig Id of the user
189   */
190  @java.lang.SuppressWarnings("all")
191  public Long getIgId() {
192    return this.igId;
193  }
194
195  /**
196   * Ig Id of the user
197   */
198  @java.lang.SuppressWarnings("all")
199  public void setIgId(final Long igId) {
200    this.igId = igId;
201  }
202
203  /**
204   * Filtered media count of the user
205   */
206  @java.lang.SuppressWarnings("all")
207  public Long getMediaCount() {
208    return this.mediaCount;
209  }
210
211  /**
212   * Filtered media count of the user
213   */
214  @java.lang.SuppressWarnings("all")
215  public void setMediaCount(final Long mediaCount) {
216    this.mediaCount = mediaCount;
217  }
218
219  /**
220   * The cdn url to query the raw profile picture of the user
221   */
222  @java.lang.SuppressWarnings("all")
223  public String getProfilePictureUrl() {
224    return this.profilePictureUrl;
225  }
226
227  /**
228   * The cdn url to query the raw profile picture of the user
229   */
230  @java.lang.SuppressWarnings("all")
231  public void setProfilePictureUrl(final String profilePictureUrl) {
232    this.profilePictureUrl = profilePictureUrl;
233  }
234
235  /**
236   * Username handle of the user
237   */
238  @java.lang.SuppressWarnings("all")
239  public String getUsername() {
240    return this.username;
241  }
242
243  /**
244   * Username handle of the user
245   */
246  @java.lang.SuppressWarnings("all")
247  public void setUsername(final String username) {
248    this.username = username;
249  }
250
251  /**
252   * Url in the profile
253   */
254  @java.lang.SuppressWarnings("all")
255  public String getWebsite() {
256    return this.website;
257  }
258
259  /**
260   * Url in the profile
261   */
262  @java.lang.SuppressWarnings("all")
263  public void setWebsite(final String website) {
264    this.website = website;
265  }
266}