001// Generated by delombok at Thu Aug 13 13:56:44 UTC 2026
002/*
003 * Copyright (c) 2010-2026 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;
024
025import static java.util.Collections.unmodifiableList;
026import java.util.ArrayList;
027import java.util.Date;
028import java.util.List;
029import com.restfb.Facebook;
030import com.restfb.types.features.HasCreatedTime;
031import com.restfb.types.features.HasFrom;
032import com.restfb.types.features.HasMessage;
033
034/**
035 * Represents the <a href="http://developers.facebook.com/docs/reference/api/checkin">Check-In Graph API type</a>.
036 *
037 * @author <a href="http://restfb.com">Mark Allen</a>
038 * @since 1.6
039 */
040public class Checkin extends FacebookType implements HasCreatedTime, HasFrom, HasMessage {
041  /**
042   * The message the user added to the check-in.
043   */
044  @Facebook
045  private String message;
046  /**
047   * The ID and name of the user who made the check-in.
048   */
049  @Facebook
050  private NamedFacebookType from;
051  /**
052   * The ID and name of the application that made the check-in.
053   */
054  @Facebook
055  private NamedFacebookType application;
056  /**
057   * The ID, name, and location of the Facebook Page that represents the location of the check-in.
058   */
059  @Facebook
060  private Place place;
061  /**
062   * The time the check-in was created.
063   */
064  @Facebook("created_time")
065  private Date createdTime;
066  @Facebook
067  private List<Comment> comments = new ArrayList<>();
068  @Facebook
069  private List<NamedFacebookType> tags = new ArrayList<>();
070  private static final long serialVersionUID = 2L;
071
072  /**
073   * The comments for the check-in.
074   *
075   * @return The comments for the check-in.
076   */
077  public List<Comment> getComments() {
078    return unmodifiableList(comments);
079  }
080
081  public boolean addComment(Comment comment) {
082    return comments.add(comment);
083  }
084
085  public boolean removeComment(Comment comment) {
086    return comments.remove(comment);
087  }
088
089  /**
090   * Tags for the check-in. I.e. Users tagged in the check-in
091   *
092   * @return Tags for the check-in.
093   */
094  public List<NamedFacebookType> getTags() {
095    return unmodifiableList(tags);
096  }
097
098  public boolean addTag(NamedFacebookType tag) {
099    return tags.add(tag);
100  }
101
102  public boolean removeTag(NamedFacebookType tag) {
103    return tags.remove(tag);
104  }
105
106  /**
107   * The message the user added to the check-in.
108   *
109   * @return The message the user added to the check-in.
110   */
111  @Override
112  @java.lang.SuppressWarnings("all")
113  @lombok.Generated
114  public String getMessage() {
115    return this.message;
116  }
117
118  /**
119   * The message the user added to the check-in.
120   */
121  @java.lang.SuppressWarnings("all")
122  @lombok.Generated
123  public void setMessage(final String message) {
124    this.message = message;
125  }
126
127  /**
128   * The ID and name of the user who made the check-in.
129   *
130   * @return The ID and name of the user who made the check-in.
131   */
132  @Override
133  @java.lang.SuppressWarnings("all")
134  @lombok.Generated
135  public NamedFacebookType getFrom() {
136    return this.from;
137  }
138
139  /**
140   * The ID and name of the user who made the check-in.
141   */
142  @java.lang.SuppressWarnings("all")
143  @lombok.Generated
144  public void setFrom(final NamedFacebookType from) {
145    this.from = from;
146  }
147
148  /**
149   * The ID and name of the application that made the check-in.
150   *
151   * @return The ID and name of the application that made the check-in.
152   */
153  @java.lang.SuppressWarnings("all")
154  @lombok.Generated
155  public NamedFacebookType getApplication() {
156    return this.application;
157  }
158
159  /**
160   * The ID and name of the application that made the check-in.
161   */
162  @java.lang.SuppressWarnings("all")
163  @lombok.Generated
164  public void setApplication(final NamedFacebookType application) {
165    this.application = application;
166  }
167
168  /**
169   * The ID, name, and location of the Facebook Page that represents the location of the check-in.
170   *
171   * @return The ID, name, and location of the Facebook Page that represents the location of the check-in.
172   */
173  @java.lang.SuppressWarnings("all")
174  @lombok.Generated
175  public Place getPlace() {
176    return this.place;
177  }
178
179  /**
180   * The ID, name, and location of the Facebook Page that represents the location of the check-in.
181   */
182  @java.lang.SuppressWarnings("all")
183  @lombok.Generated
184  public void setPlace(final Place place) {
185    this.place = place;
186  }
187
188  /**
189   * The time the check-in was created.
190   *
191   * @return The time the check-in was created.
192   */
193  @Override
194  @java.lang.SuppressWarnings("all")
195  @lombok.Generated
196  public Date getCreatedTime() {
197    return this.createdTime;
198  }
199
200  /**
201   * The time the check-in was created.
202   */
203  @java.lang.SuppressWarnings("all")
204  @lombok.Generated
205  public void setCreatedTime(final Date createdTime) {
206    this.createdTime = createdTime;
207  }
208}