001// Generated by delombok at Tue Dec 10 13:42:03 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; 024 025import java.util.ArrayList; 026import java.util.Collections; 027import java.util.List; 028import com.restfb.Facebook; 029 030/** 031 * Represents the <a href= 032 * "https://developers.facebook.com/docs/graph-api/reference/whats-app-business-account/conversation_analytics/">WhatsApp 033 * Business Account Conversation Analytics</a> type 034 */ 035public class WABAConversationAnalytics { 036 @Facebook("conversation_directions") 037 private List<WABAConversationDirection> conversationDirections; 038 @Facebook("conversation_types") 039 private List<WABAConversationType> conversationTypes; 040 @Facebook("country_codes") 041 private List<String> countryCodes; 042 @Facebook 043 private List<WABADimension> dimensions; 044 @Facebook 045 private Integer end; 046 @Facebook 047 private WABAGranularity granularity; 048 @Facebook("metric_types") 049 private List<WABAMetricType> metricTypes; 050 @Facebook("phone_numbers") 051 private List<String> phoneNumbers; 052 @Facebook 053 private Integer start; 054 055 public List<WABAMetricType> getMetricTypes() { 056 return Collections.unmodifiableList(getMetricTypesList()); 057 } 058 059 public boolean addMetricType(WABAMetricType metricType) { 060 return getMetricTypesList().add(metricType); 061 } 062 063 public boolean removeMetricType(WABAMetricType metricType) { 064 return getMetricTypesList().remove(metricType); 065 } 066 067 private List<WABAMetricType> getMetricTypesList() { 068 if (metricTypes == null) { 069 metricTypes = new ArrayList<>(); 070 } 071 return metricTypes; 072 } 073 074 public List<WABAConversationType> getConversationTypes() { 075 return Collections.unmodifiableList(getConversationTypesList()); 076 } 077 078 public boolean addConversationType(WABAConversationType conversationType) { 079 return getConversationTypesList().add(conversationType); 080 } 081 082 public boolean removeConversationType(WABAConversationType conversationType) { 083 return getConversationTypesList().remove(conversationType); 084 } 085 086 private List<WABAConversationType> getConversationTypesList() { 087 if (conversationTypes == null) { 088 conversationTypes = new ArrayList<>(); 089 } 090 return conversationTypes; 091 } 092 093 public List<WABAConversationDirection> getConversationDirections() { 094 return Collections.unmodifiableList(getConversationDirectionsList()); 095 } 096 097 public boolean addConversationDirection(WABAConversationDirection conversationDirection) { 098 return getConversationDirectionsList().add(conversationDirection); 099 } 100 101 public boolean removeConversationDirection(WABAConversationDirection conversationDirection) { 102 return getConversationDirectionsList().remove(conversationDirection); 103 } 104 105 private List<WABAConversationDirection> getConversationDirectionsList() { 106 if (conversationDirections == null) { 107 conversationDirections = new ArrayList<>(); 108 } 109 return conversationDirections; 110 } 111 112 public List<WABADimension> getDimensions() { 113 return Collections.unmodifiableList(getDimensionsList()); 114 } 115 116 public boolean addDimension(WABADimension dimension) { 117 return getDimensionsList().add(dimension); 118 } 119 120 public boolean removeDimension(WABADimension dimension) { 121 return getDimensionsList().remove(dimension); 122 } 123 124 private List<WABADimension> getDimensionsList() { 125 if (dimensions == null) { 126 dimensions = new ArrayList<>(); 127 } 128 return dimensions; 129 } 130 131 public List<String> getPhoneNumbers() { 132 return Collections.unmodifiableList(getPhoneNumbersList()); 133 } 134 135 public boolean addPhoneNumber(String phoneNumber) { 136 return getPhoneNumbersList().add(phoneNumber); 137 } 138 139 public boolean removePhoneNumber(String phoneNumber) { 140 return getPhoneNumbersList().remove(phoneNumber); 141 } 142 143 private List<String> getPhoneNumbersList() { 144 if (phoneNumbers == null) { 145 phoneNumbers = new ArrayList<>(); 146 } 147 return phoneNumbers; 148 } 149 150 /** 151 * List of ISO 3166 country codes (e.g. US, IN) 152 */ 153 public List<String> getCountryCodes() { 154 return Collections.unmodifiableList(getCountryCodesList()); 155 } 156 157 public boolean addCountryCode(String countryCode) { 158 return getCountryCodesList().add(countryCode); 159 } 160 161 public boolean removeCountryCode(String countryCode) { 162 return getCountryCodesList().remove(countryCode); 163 } 164 165 private List<String> getCountryCodesList() { 166 if (countryCodes == null) { 167 countryCodes = new ArrayList<>(); 168 } 169 return countryCodes; 170 } 171 172 @java.lang.SuppressWarnings("all") 173 public Integer getEnd() { 174 return this.end; 175 } 176 177 @java.lang.SuppressWarnings("all") 178 public void setEnd(final Integer end) { 179 this.end = end; 180 } 181 182 @java.lang.SuppressWarnings("all") 183 public WABAGranularity getGranularity() { 184 return this.granularity; 185 } 186 187 @java.lang.SuppressWarnings("all") 188 public void setGranularity(final WABAGranularity granularity) { 189 this.granularity = granularity; 190 } 191 192 @java.lang.SuppressWarnings("all") 193 public Integer getStart() { 194 return this.start; 195 } 196 197 @java.lang.SuppressWarnings("all") 198 public void setStart(final Integer start) { 199 this.start = start; 200 } 201}