001// Generated by delombok at Fri Aug 16 13:39:53 UTC 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.whatsapp.platform; 024 025import java.util.ArrayList; 026import java.util.Date; 027import java.util.List; 028import com.restfb.Facebook; 029import com.restfb.types.AbstractFacebookType; 030import com.restfb.types.whatsapp.platform.status.Conversation; 031import com.restfb.types.whatsapp.platform.status.Pricing; 032 033public class Status extends AbstractFacebookType { 034 @Facebook 035 private String id; 036 /** 037 * Arbitrary string included in sent message. 038 */ 039 @Facebook("biz_opaque_callback_data") 040 private String bizOpaqueCallbackData; 041 @Facebook 042 private Date timestamp; 043 @Facebook("recipient_id") 044 private String recipientId; 045 @Facebook 046 private StatusType status; 047 @Facebook 048 private Pricing pricing; 049 @Facebook 050 private Conversation conversation; 051 @Facebook 052 private List<Error> errors = new ArrayList<>(); 053 054 055 public enum StatusType { 056 delivered, read, sent, failed, deleted; 057 } 058 059 public boolean hasErrors() { 060 return !errors.isEmpty(); 061 } 062 063 @java.lang.SuppressWarnings("all") 064 public String getId() { 065 return this.id; 066 } 067 068 @java.lang.SuppressWarnings("all") 069 public void setId(final String id) { 070 this.id = id; 071 } 072 073 /** 074 * Arbitrary string included in sent message. 075 */ 076 @java.lang.SuppressWarnings("all") 077 public String getBizOpaqueCallbackData() { 078 return this.bizOpaqueCallbackData; 079 } 080 081 /** 082 * Arbitrary string included in sent message. 083 */ 084 @java.lang.SuppressWarnings("all") 085 public void setBizOpaqueCallbackData(final String bizOpaqueCallbackData) { 086 this.bizOpaqueCallbackData = bizOpaqueCallbackData; 087 } 088 089 @java.lang.SuppressWarnings("all") 090 public Date getTimestamp() { 091 return this.timestamp; 092 } 093 094 @java.lang.SuppressWarnings("all") 095 public void setTimestamp(final Date timestamp) { 096 this.timestamp = timestamp; 097 } 098 099 @java.lang.SuppressWarnings("all") 100 public String getRecipientId() { 101 return this.recipientId; 102 } 103 104 @java.lang.SuppressWarnings("all") 105 public void setRecipientId(final String recipientId) { 106 this.recipientId = recipientId; 107 } 108 109 @java.lang.SuppressWarnings("all") 110 public StatusType getStatus() { 111 return this.status; 112 } 113 114 @java.lang.SuppressWarnings("all") 115 public void setStatus(final StatusType status) { 116 this.status = status; 117 } 118 119 @java.lang.SuppressWarnings("all") 120 public Pricing getPricing() { 121 return this.pricing; 122 } 123 124 @java.lang.SuppressWarnings("all") 125 public void setPricing(final Pricing pricing) { 126 this.pricing = pricing; 127 } 128 129 @java.lang.SuppressWarnings("all") 130 public Conversation getConversation() { 131 return this.conversation; 132 } 133 134 @java.lang.SuppressWarnings("all") 135 public void setConversation(final Conversation conversation) { 136 this.conversation = conversation; 137 } 138 139 @java.lang.SuppressWarnings("all") 140 public List<Error> getErrors() { 141 return this.errors; 142 } 143 144 @java.lang.SuppressWarnings("all") 145 public void setErrors(final List<Error> errors) { 146 this.errors = errors; 147 } 148}