001// Generated by delombok at Thu Aug 13 13:56:43 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.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  @lombok.Generated
090  public NamedAdsObject getBusinessPersona() {
091    return this.businessPersona;
092  }
093
094  @java.lang.SuppressWarnings("all")
095  @lombok.Generated
096  public void setBusinessPersona(final NamedAdsObject businessPersona) {
097    this.businessPersona = businessPersona;
098  }
099
100  @java.lang.SuppressWarnings("all")
101  @lombok.Generated
102  public String getRole() {
103    return this.role;
104  }
105
106  @java.lang.SuppressWarnings("all")
107  @lombok.Generated
108  public void setRole(final String role) {
109    this.role = role;
110  }
111
112  @java.lang.SuppressWarnings("all")
113  @lombok.Generated
114  public String getStatus() {
115    return this.status;
116  }
117
118  @java.lang.SuppressWarnings("all")
119  @lombok.Generated
120  public void setStatus(final String status) {
121    this.status = status;
122  }
123
124  @java.lang.SuppressWarnings("all")
125  @lombok.Generated
126  public String getEmail() {
127    return this.email;
128  }
129
130  @java.lang.SuppressWarnings("all")
131  @lombok.Generated
132  public void setEmail(final String email) {
133    this.email = email;
134  }
135
136  @java.lang.SuppressWarnings("all")
137  @lombok.Generated
138  public String getCreatedBy() {
139    return this.createdBy;
140  }
141
142  @java.lang.SuppressWarnings("all")
143  @lombok.Generated
144  public void setCreatedBy(final String createdBy) {
145    this.createdBy = createdBy;
146  }
147
148  @java.lang.SuppressWarnings("all")
149  @lombok.Generated
150  public String getUpdatedBy() {
151    return this.updatedBy;
152  }
153
154  @java.lang.SuppressWarnings("all")
155  @lombok.Generated
156  public void setUpdatedBy(final String updatedBy) {
157    this.updatedBy = updatedBy;
158  }
159
160  @java.lang.SuppressWarnings("all")
161  @lombok.Generated
162  public NamedAdsObject getUser() {
163    return this.user;
164  }
165
166  @java.lang.SuppressWarnings("all")
167  @lombok.Generated
168  public void setUser(final NamedAdsObject user) {
169    this.user = user;
170  }
171
172  @Override
173  @java.lang.SuppressWarnings("all")
174  @lombok.Generated
175  public Date getCreatedTime() {
176    return this.createdTime;
177  }
178
179  @java.lang.SuppressWarnings("all")
180  @lombok.Generated
181  public void setCreatedTime(final Date createdTime) {
182    this.createdTime = createdTime;
183  }
184
185  @java.lang.SuppressWarnings("all")
186  @lombok.Generated
187  public Date getUpdatedTime() {
188    return this.updatedTime;
189  }
190
191  @java.lang.SuppressWarnings("all")
192  @lombok.Generated
193  public void setUpdatedTime(final Date updatedTime) {
194    this.updatedTime = updatedTime;
195  }
196}