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