001/*
002 * Copyright 2015-2017 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright (C) 2015-2017 Ping Identity Corporation
007 *
008 * This program is free software; you can redistribute it and/or modify
009 * it under the terms of the GNU General Public License (GPLv2 only)
010 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
011 * as published by the Free Software Foundation.
012 *
013 * This program is distributed in the hope that it will be useful,
014 * but WITHOUT ANY WARRANTY; without even the implied warranty of
015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
016 * GNU General Public License for more details.
017 *
018 * You should have received a copy of the GNU General Public License
019 * along with this program; if not, see <http://www.gnu.org/licenses>.
020 */
021package com.unboundid.ldap.sdk.unboundidds.extensions;
022
023
024
025/**
026 * This enum defines a set of change type values that may be used in conjunction
027 * with the set notification destination extended request.
028 * <BR>
029 * <BLOCKQUOTE>
030 *   <B>NOTE:</B>  This class, and other classes within the
031 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
032 *   supported for use against Ping Identity, UnboundID, and Alcatel-Lucent 8661
033 *   server products.  These classes provide support for proprietary
034 *   functionality or for external specifications that are not considered stable
035 *   or mature enough to be guaranteed to work in an interoperable way with
036 *   other types of LDAP servers.
037 * </BLOCKQUOTE>
038 */
039public enum SetNotificationDestinationChangeType
040{
041  /**
042   * Indicates that the complete set of destination details should be replaced.
043   */
044  REPLACE(0),
045
046
047
048  /**
049   * Indicates that the provided destination details should be added to the
050   * existing set.
051   */
052  ADD(1),
053
054
055
056  /**
057   * Indicates tht the specified destination details should be removed from the
058   * notification destination.
059   */
060  DELETE(2);
061
062
063
064  // The integer value for this change type.
065  private final int intValue;
066
067
068
069  /**
070   * Creates a new set notification destination change type with the provided
071   * information.
072   *
073   * @param  intValue  The integer value for this change type.
074   */
075  SetNotificationDestinationChangeType(final int intValue)
076  {
077    this.intValue = intValue;
078  }
079
080
081
082  /**
083   * Retrieves the integer value for this set notification destination change
084   * type.
085   *
086   * @return  The integer value for this set notification destination change
087   *          type.
088   */
089  public int intValue()
090  {
091    return intValue;
092  }
093
094
095
096  /**
097   * Retrieves the set notification destination change type with the specified
098   * integer value.
099   *
100   * @param  intValue  The integer value for the change type to retrieve.
101   *
102   * @return  The requested change type, or {@code null} if there is no change
103   *          type with the specified integer value.
104   */
105  public static SetNotificationDestinationChangeType valueOf(final int intValue)
106  {
107    for (final SetNotificationDestinationChangeType t : values())
108    {
109      if (t.intValue == intValue)
110      {
111        return t;
112      }
113    }
114
115    return null;
116  }
117}