001// Generated by delombok at Fri Oct 04 16:05:59 CEST 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.ads; 024 025import java.util.Date; 026import com.restfb.Facebook; 027import com.restfb.json.Json; 028import com.restfb.json.JsonObject; 029import com.restfb.types.AbstractFacebookType; 030import com.restfb.types.features.HasCreatedTime; 031 032public class UserPermission extends AbstractFacebookType implements HasCreatedTime { 033 @Facebook("business_persona") 034 private NamedAdsObject businessPersona; 035 @Facebook 036 private String role; 037 @Facebook 038 private String status; 039 @Facebook 040 private String email; 041 @Facebook("created_by") 042 private String createdBy; 043 @Facebook("updated_by") 044 private String updatedBy; 045 @Facebook("page_permissions") 046 private String pagePermissions; 047 @Facebook("adaccount_permissions") 048 private String adaccountPermissions; 049 @Facebook 050 private NamedAdsObject user; 051 @Facebook("created_time") 052 private Date createdTime; 053 @Facebook("updated_time") 054 private Date updatedTime; 055 056 public JsonObject getPagePermissions() { 057 if (pagePermissions != null) { 058 return Json.parse(pagePermissions).asObject(); 059 } else { 060 return null; 061 } 062 } 063 064 public void setPagePermissions(JsonObject pagePermissions) { 065 if (pagePermissions != null) { 066 this.pagePermissions = pagePermissions.toString(); 067 } else { 068 this.pagePermissions = null; 069 } 070 } 071 072 public JsonObject getAdaccountPermissions() { 073 if (adaccountPermissions != null) { 074 return Json.parse(adaccountPermissions).asObject(); 075 } else { 076 return null; 077 } 078 } 079 080 public void setAdaccountPermissions(JsonObject adaccountPermissions) { 081 if (adaccountPermissions != null) { 082 this.adaccountPermissions = adaccountPermissions.toString(); 083 } else { 084 this.adaccountPermissions = null; 085 } 086 } 087 088 @java.lang.SuppressWarnings("all") 089 public NamedAdsObject getBusinessPersona() { 090 return this.businessPersona; 091 } 092 093 @java.lang.SuppressWarnings("all") 094 public void setBusinessPersona(final NamedAdsObject businessPersona) { 095 this.businessPersona = businessPersona; 096 } 097 098 @java.lang.SuppressWarnings("all") 099 public String getRole() { 100 return this.role; 101 } 102 103 @java.lang.SuppressWarnings("all") 104 public void setRole(final String role) { 105 this.role = role; 106 } 107 108 @java.lang.SuppressWarnings("all") 109 public String getStatus() { 110 return this.status; 111 } 112 113 @java.lang.SuppressWarnings("all") 114 public void setStatus(final String status) { 115 this.status = status; 116 } 117 118 @java.lang.SuppressWarnings("all") 119 public String getEmail() { 120 return this.email; 121 } 122 123 @java.lang.SuppressWarnings("all") 124 public void setEmail(final String email) { 125 this.email = email; 126 } 127 128 @java.lang.SuppressWarnings("all") 129 public String getCreatedBy() { 130 return this.createdBy; 131 } 132 133 @java.lang.SuppressWarnings("all") 134 public void setCreatedBy(final String createdBy) { 135 this.createdBy = createdBy; 136 } 137 138 @java.lang.SuppressWarnings("all") 139 public String getUpdatedBy() { 140 return this.updatedBy; 141 } 142 143 @java.lang.SuppressWarnings("all") 144 public void setUpdatedBy(final String updatedBy) { 145 this.updatedBy = updatedBy; 146 } 147 148 @java.lang.SuppressWarnings("all") 149 public NamedAdsObject getUser() { 150 return this.user; 151 } 152 153 @java.lang.SuppressWarnings("all") 154 public void setUser(final NamedAdsObject user) { 155 this.user = user; 156 } 157 158 @Override 159 @java.lang.SuppressWarnings("all") 160 public Date getCreatedTime() { 161 return this.createdTime; 162 } 163 164 @java.lang.SuppressWarnings("all") 165 public void setCreatedTime(final Date createdTime) { 166 this.createdTime = createdTime; 167 } 168 169 @java.lang.SuppressWarnings("all") 170 public Date getUpdatedTime() { 171 return this.updatedTime; 172 } 173 174 @java.lang.SuppressWarnings("all") 175 public void setUpdatedTime(final Date updatedTime) { 176 this.updatedTime = updatedTime; 177 } 178}