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