/*
 * ***** BEGIN LICENSE BLOCK *****
 * Zimbra Collaboration Suite Server
 * Copyright (C) 2010 Zimbra, Inc.
 *
 * The contents of this file are subject to the Zimbra Public License
 * Version 1.3 ("License"); you may not use this file except in
 * compliance with the License.  You may obtain a copy of the License at
 * http://www.zimbra.com/license.
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
 * ***** END LICENSE BLOCK *****
 */

package com.zimbra.soap.account.message;

import java.util.Collections;
import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;

import com.zimbra.common.soap.AccountConstants;
import com.zimbra.soap.account.type.Pref;

/**
 * @zm-api-command-auth-required true
 * @zm-api-command-admin-auth-required false
 * @zm-api-command-description Get preferences for the authenticated account
 * <br />
 * If no <b>&lt;pref></b> elements are provided, all known prefs are returned in the response.
 * <br />
 * If <b>&lt;pref></b> elements are provided, only those prefs are returned in the response.
 */
@XmlAccessorType(XmlAccessType.NONE)
@XmlRootElement(name=AccountConstants.E_GET_PREFS_REQUEST)
public class GetPrefsRequest {
    /**
     * @zm-api-field-description If any of these are specified then only get these preferences
     */
    @XmlElement(name=AccountConstants.E_PREF)
    private List<Pref> pref;

    public void setPref(List<Pref> pref) {
        this.pref = pref;
    }

    public List<Pref> getPref() {
        return Collections.unmodifiableList(pref);
    }
}
