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 java.util.ArrayList; 026import java.util.Collections; 027import java.util.List; 028import com.restfb.Facebook; 029 030public class VideoPoll extends FacebookType { 031 private static final long serialVersionUID = 1L; 032 /** 033 * True if this is a Live poll with open voting and the card hides after voting 034 */ 035 @Facebook("close_after_voting") 036 private Boolean closeAfterVoting; 037 /** 038 * True if the poll should be open by default, false if it starts in a closed state 039 */ 040 @Facebook("default_open") 041 private Boolean defaultOpen; 042 /** 043 * The poll question text 044 */ 045 @Facebook 046 private String question; 047 /** 048 * True if this is a Live poll and voting is open and there is a background gradient to highlight the voting card 049 */ 050 @Facebook("show_gradient") 051 private Boolean showGradient; 052 /** 053 * True if this is a Live poll and voting is open and the results show after voting 054 */ 055 @Facebook("show_results") 056 private Boolean showResults; 057 /** 058 * Live poll status 059 */ 060 @Facebook 061 private String status; 062 @Facebook("poll_options") 063 private List<VideoPollOption> pollOptions = new ArrayList<>(); 064 065 public List<VideoPollOption> getPollOptions() { 066 return Collections.unmodifiableList(pollOptions); 067 } 068 069 public boolean addPollOption(VideoPollOption option) { 070 return pollOptions.add(option); 071 } 072 073 public boolean removePollOption(VideoPollOption option) { 074 return pollOptions.remove(option); 075 } 076 077 078 public static class VideoPollOption extends FacebookType { 079 private static final long serialVersionUID = 1L; 080 /** 081 * True if this answer is considered correct, otherwise false 082 */ 083 @Facebook("is_correct") 084 private Boolean isCorrect; 085 /** 086 * Options appear in increasing numerical order within a poll 087 */ 088 @Facebook 089 private Long order; 090 /** 091 * Text to display to the user for this option 092 */ 093 @Facebook 094 private String text; 095 /** 096 * Total number of votes for this option 097 */ 098 @Facebook("total_votes") 099 private Long totalVotes; 100 101 /** 102 * True if this answer is considered correct, otherwise false 103 * 104 * @return True if this answer is considered correct, otherwise false 105 */ 106 @java.lang.SuppressWarnings("all") 107 @lombok.Generated 108 public Boolean getIsCorrect() { 109 return this.isCorrect; 110 } 111 112 /** 113 * True if this answer is considered correct, otherwise false 114 */ 115 @java.lang.SuppressWarnings("all") 116 @lombok.Generated 117 public void setIsCorrect(final Boolean isCorrect) { 118 this.isCorrect = isCorrect; 119 } 120 121 /** 122 * Options appear in increasing numerical order within a poll 123 * 124 * @return Options appear in increasing numerical order within a poll 125 */ 126 @java.lang.SuppressWarnings("all") 127 @lombok.Generated 128 public Long getOrder() { 129 return this.order; 130 } 131 132 /** 133 * Options appear in increasing numerical order within a poll 134 */ 135 @java.lang.SuppressWarnings("all") 136 @lombok.Generated 137 public void setOrder(final Long order) { 138 this.order = order; 139 } 140 141 /** 142 * Text to display to the user for this option 143 * 144 * @return Text to display to the user for this option 145 */ 146 @java.lang.SuppressWarnings("all") 147 @lombok.Generated 148 public String getText() { 149 return this.text; 150 } 151 152 /** 153 * Text to display to the user for this option 154 */ 155 @java.lang.SuppressWarnings("all") 156 @lombok.Generated 157 public void setText(final String text) { 158 this.text = text; 159 } 160 161 /** 162 * Total number of votes for this option 163 * 164 * @return Total number of votes for this option 165 */ 166 @java.lang.SuppressWarnings("all") 167 @lombok.Generated 168 public Long getTotalVotes() { 169 return this.totalVotes; 170 } 171 172 /** 173 * Total number of votes for this option 174 */ 175 @java.lang.SuppressWarnings("all") 176 @lombok.Generated 177 public void setTotalVotes(final Long totalVotes) { 178 this.totalVotes = totalVotes; 179 } 180 } 181 182 /** 183 * True if this is a Live poll with open voting and the card hides after voting 184 * 185 * @return True if this is a Live poll with open voting and the card hides after voting 186 */ 187 @java.lang.SuppressWarnings("all") 188 @lombok.Generated 189 public Boolean getCloseAfterVoting() { 190 return this.closeAfterVoting; 191 } 192 193 /** 194 * True if this is a Live poll with open voting and the card hides after voting 195 */ 196 @java.lang.SuppressWarnings("all") 197 @lombok.Generated 198 public void setCloseAfterVoting(final Boolean closeAfterVoting) { 199 this.closeAfterVoting = closeAfterVoting; 200 } 201 202 /** 203 * True if the poll should be open by default, false if it starts in a closed state 204 * 205 * @return True if the poll should be open by default, false if it starts in a closed state 206 */ 207 @java.lang.SuppressWarnings("all") 208 @lombok.Generated 209 public Boolean getDefaultOpen() { 210 return this.defaultOpen; 211 } 212 213 /** 214 * True if the poll should be open by default, false if it starts in a closed state 215 */ 216 @java.lang.SuppressWarnings("all") 217 @lombok.Generated 218 public void setDefaultOpen(final Boolean defaultOpen) { 219 this.defaultOpen = defaultOpen; 220 } 221 222 /** 223 * The poll question text 224 * 225 * @return The poll question text 226 */ 227 @java.lang.SuppressWarnings("all") 228 @lombok.Generated 229 public String getQuestion() { 230 return this.question; 231 } 232 233 /** 234 * The poll question text 235 */ 236 @java.lang.SuppressWarnings("all") 237 @lombok.Generated 238 public void setQuestion(final String question) { 239 this.question = question; 240 } 241 242 /** 243 * True if this is a Live poll and voting is open and there is a background gradient to highlight the voting card 244 * 245 * @return True if this is a Live poll and voting is open and there is a background gradient to highlight the voting 246 * card 247 */ 248 @java.lang.SuppressWarnings("all") 249 @lombok.Generated 250 public Boolean getShowGradient() { 251 return this.showGradient; 252 } 253 254 /** 255 * True if this is a Live poll and voting is open and there is a background gradient to highlight the voting card 256 */ 257 @java.lang.SuppressWarnings("all") 258 @lombok.Generated 259 public void setShowGradient(final Boolean showGradient) { 260 this.showGradient = showGradient; 261 } 262 263 /** 264 * True if this is a Live poll and voting is open and the results show after voting 265 * 266 * @return True if this is a Live poll and voting is open and the results show after voting 267 */ 268 @java.lang.SuppressWarnings("all") 269 @lombok.Generated 270 public Boolean getShowResults() { 271 return this.showResults; 272 } 273 274 /** 275 * True if this is a Live poll and voting is open and the results show after voting 276 */ 277 @java.lang.SuppressWarnings("all") 278 @lombok.Generated 279 public void setShowResults(final Boolean showResults) { 280 this.showResults = showResults; 281 } 282 283 /** 284 * Live poll status 285 * 286 * @return Live poll status 287 */ 288 @java.lang.SuppressWarnings("all") 289 @lombok.Generated 290 public String getStatus() { 291 return this.status; 292 } 293 294 /** 295 * Live poll status 296 */ 297 @java.lang.SuppressWarnings("all") 298 @lombok.Generated 299 public void setStatus(final String status) { 300 this.status = status; 301 } 302}