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.ads;
024
025import java.util.ArrayList;
026import java.util.Collections;
027import java.util.List;
028import com.restfb.Facebook;
029
030/**
031 * Represents the <a href="https://developers.facebook.com/docs/marketing-api/adaccountgroup/">AdGroup Account Group
032 * Type</a> .
033 */
034public class AdAccountGroup extends NamedAdsObject {
035  private static final long serialVersionUID = 1L;
036  @Facebook
037  private Integer status;
038  @Facebook("account_group_id")
039  private String accountGroupId;
040  /**
041   * The users who own the ad account group.
042   */
043  @Facebook
044  private final List<AdAccountGroupUser> users = new ArrayList<>();
045  /**
046   * The AdGroup Accounts in the ad account group.
047   */
048  @Facebook
049  private final List<AdAccountGroupAccount> accounts = new ArrayList<>();
050
051  public boolean addUser(AdAccountGroupUser user) {
052    return users.add(user);
053  }
054
055  public boolean removeUser(AdAccountGroupUser user) {
056    return users.remove(user);
057  }
058
059  public List<AdAccountGroupUser> getUsers() {
060    return Collections.unmodifiableList(users);
061  }
062
063  public boolean addAccount(AdAccountGroupAccount account) {
064    return accounts.add(account);
065  }
066
067  public boolean removeAccount(AdAccountGroupAccount account) {
068    return accounts.remove(account);
069  }
070
071  public List<AdAccountGroupAccount> getAccounts() {
072    return Collections.unmodifiableList(accounts);
073  }
074
075  @java.lang.SuppressWarnings("all")
076  public Integer getStatus() {
077    return this.status;
078  }
079
080  @java.lang.SuppressWarnings("all")
081  public void setStatus(final Integer status) {
082    this.status = status;
083  }
084
085  @java.lang.SuppressWarnings("all")
086  public String getAccountGroupId() {
087    return this.accountGroupId;
088  }
089
090  @java.lang.SuppressWarnings("all")
091  public void setAccountGroupId(final String accountGroupId) {
092    this.accountGroupId = accountGroupId;
093  }
094}