001/*
002 * Copyright 2022-2024 Ping Identity Corporation
003 * All Rights Reserved.
004 */
005/*
006 * Copyright 2022-2024 Ping Identity Corporation
007 *
008 * Licensed under the Apache License, Version 2.0 (the "License");
009 * you may not use this file except in compliance with the License.
010 * You may obtain a copy of the License at
011 *
012 *    http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing, software
015 * distributed under the License is distributed on an "AS IS" BASIS,
016 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017 * See the License for the specific language governing permissions and
018 * limitations under the License.
019 */
020/*
021 * Copyright (C) 2022-2024 Ping Identity Corporation
022 *
023 * This program is free software; you can redistribute it and/or modify
024 * it under the terms of the GNU General Public License (GPLv2 only)
025 * or the terms of the GNU Lesser General Public License (LGPLv2.1 only)
026 * as published by the Free Software Foundation.
027 *
028 * This program is distributed in the hope that it will be useful,
029 * but WITHOUT ANY WARRANTY; without even the implied warranty of
030 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
031 * GNU General Public License for more details.
032 *
033 * You should have received a copy of the GNU General Public License
034 * along with this program; if not, see <http://www.gnu.org/licenses>.
035 */
036package com.unboundid.ldap.sdk.unboundidds.logs.v2.json;
037
038
039
040import java.util.List;
041import java.util.Set;
042
043import com.unboundid.ldap.sdk.ResultCode;
044import com.unboundid.ldap.sdk.unboundidds.controls.AssuredReplicationLocalLevel;
045import com.unboundid.ldap.sdk.unboundidds.controls.
046            AssuredReplicationRemoteLevel;
047import com.unboundid.ldap.sdk.unboundidds.logs.AccessLogMessageType;
048import com.unboundid.ldap.sdk.unboundidds.logs.LogException;
049import com.unboundid.ldap.sdk.unboundidds.logs.v2.
050            ModifyDNResultAccessLogMessage;
051import com.unboundid.util.NotExtensible;
052import com.unboundid.util.NotMutable;
053import com.unboundid.util.NotNull;
054import com.unboundid.util.Nullable;
055import com.unboundid.util.ThreadSafety;
056import com.unboundid.util.ThreadSafetyLevel;
057import com.unboundid.util.json.JSONObject;
058
059
060
061/**
062 * This class provides a data structure that holds information about a
063 * JSON-formatted modify DN result access log message.
064 * <BR>
065 * <BLOCKQUOTE>
066 *   <B>NOTE:</B>  This class, and other classes within the
067 *   {@code com.unboundid.ldap.sdk.unboundidds} package structure, are only
068 *   supported for use against Ping Identity, UnboundID, and
069 *   Nokia/Alcatel-Lucent 8661 server products.  These classes provide support
070 *   for proprietary functionality or for external specifications that are not
071 *   considered stable or mature enough to be guaranteed to work in an
072 *   interoperable way with other types of LDAP servers.
073 * </BLOCKQUOTE>
074 */
075@NotExtensible()
076@NotMutable()
077@ThreadSafety(level=ThreadSafetyLevel.COMPLETELY_THREADSAFE)
078public class JSONModifyDNResultAccessLogMessage
079       extends JSONModifyDNRequestAccessLogMessage
080       implements ModifyDNResultAccessLogMessage
081{
082  /**
083   * The serial version UID for this serializable class.
084   */
085  private static final long serialVersionUID = -1217927948966918856L;
086
087
088
089  // The forward helper for this access log message.
090  @NotNull private final JSONForwardAccessLogMessageHelper forwardHelper;
091
092  // The result helper for this access log message.
093  @NotNull private final JSONResultAccessLogMessageHelper resultHelper;
094
095
096
097  /**
098   * Creates a new JSON modify DN result access log message from the provided
099   * JSON object.
100   *
101   * @param  jsonObject  The JSON object that contains an encoded representation
102   *                     of this log message.  It must not be {@code null}.
103   *
104   * @throws  LogException  If the provided JSON object cannot be parsed as a
105   *                        valid log message.
106   */
107  public JSONModifyDNResultAccessLogMessage(
108              @NotNull final JSONObject jsonObject)
109         throws LogException
110  {
111    super(jsonObject);
112
113    resultHelper = new JSONResultAccessLogMessageHelper(this);
114    forwardHelper = new JSONForwardAccessLogMessageHelper(this);
115  }
116
117
118
119  /**
120   * {@inheritDoc}
121   */
122  @Override()
123  @NotNull()
124  public AccessLogMessageType getMessageType()
125  {
126    return AccessLogMessageType.RESULT;
127  }
128
129
130
131  /**
132   * {@inheritDoc}
133   */
134  @Override()
135  @Nullable()
136  public final ResultCode getResultCode()
137  {
138    return resultHelper.getResultCode();
139  }
140
141
142
143  /**
144   * {@inheritDoc}
145   */
146  @Override()
147  @Nullable()
148  public final String getDiagnosticMessage()
149  {
150    return resultHelper.getDiagnosticMessage();
151  }
152
153
154
155  /**
156   * {@inheritDoc}
157   */
158  @Override()
159  @Nullable()
160  public final String getAdditionalInformation()
161  {
162    return resultHelper.getAdditionalInformation();
163  }
164
165
166
167  /**
168   * {@inheritDoc}
169   */
170  @Override()
171  @Nullable()
172  public final String getMatchedDN()
173  {
174    return resultHelper.getMatchedDN();
175  }
176
177
178
179  /**
180   * {@inheritDoc}
181   */
182  @Override()
183  @NotNull()
184  public final List<String> getReferralURLs()
185  {
186    return resultHelper.getReferralURLs();
187  }
188
189
190
191  /**
192   * {@inheritDoc}
193   */
194  @Override()
195  @Nullable()
196  public final Double getProcessingTimeMillis()
197  {
198    return resultHelper.getProcessingTimeMillis();
199  }
200
201
202
203  /**
204   * {@inheritDoc}
205   */
206  @Override()
207  @Nullable()
208  public final Double getWorkQueueWaitTimeMillis()
209  {
210    return resultHelper.getWorkQueueWaitTimeMillis();
211  }
212
213
214
215  /**
216   * {@inheritDoc}
217   */
218  @Override()
219  @NotNull()
220  public final Set<String> getResponseControlOIDs()
221  {
222    return resultHelper.getResponseControlOIDs();
223  }
224
225
226
227  /**
228   * {@inheritDoc}
229   */
230  @Override()
231  @Nullable()
232  public final Long getIntermediateResponsesReturned()
233  {
234    return resultHelper.getIntermediateResponsesReturned();
235  }
236
237
238
239  /**
240   * {@inheritDoc}
241   */
242  @Override()
243  @NotNull()
244  public final List<String> getServersAccessed()
245  {
246    return resultHelper.getServersAccessed();
247  }
248
249
250
251  /**
252   * {@inheritDoc}
253   */
254  @Override()
255  @Nullable()
256  public final Boolean getUncachedDataAccessed()
257  {
258    return resultHelper.getUncachedDataAccessed();
259  }
260
261
262
263  /**
264   * {@inheritDoc}
265   */
266  @Override()
267  @NotNull()
268  public final Set<String> getUsedPrivileges()
269  {
270    return resultHelper.getUsedPrivileges();
271  }
272
273
274
275  /**
276   * {@inheritDoc}
277   */
278  @Override()
279  @NotNull()
280  public final Set<String> getPreAuthorizationUsedPrivileges()
281  {
282    return resultHelper.getPreAuthorizationUsedPrivileges();
283  }
284
285
286
287  /**
288   * {@inheritDoc}
289   */
290  @Override()
291  @NotNull()
292  public final Set<String> getMissingPrivileges()
293  {
294    return resultHelper.getMissingPrivileges();
295  }
296
297
298
299  /**
300   * {@inheritDoc}
301   */
302  @Override()
303  @Nullable()
304  public final String getAlternateAuthorizationDN()
305  {
306    return resultHelper.getAlternateAuthorizationDN();
307  }
308
309
310
311  /**
312   * {@inheritDoc}
313   */
314  @Override()
315  @Nullable()
316  public final String getReplicationChangeID()
317  {
318    return resultHelper.getReplicationChangeID();
319  }
320
321
322
323  /**
324   * {@inheritDoc}
325   */
326  @Override()
327  @Nullable()
328  public final AssuredReplicationLocalLevel getAssuredReplicationLocalLevel()
329  {
330    return resultHelper.getAssuredReplicationLocalLevel();
331  }
332
333
334
335  /**
336   * {@inheritDoc}
337   */
338  @Override()
339  @Nullable()
340  public final AssuredReplicationRemoteLevel getAssuredReplicationRemoteLevel()
341  {
342    return resultHelper.getAssuredReplicationRemoteLevel();
343  }
344
345
346
347  /**
348   * {@inheritDoc}
349   */
350  @Override()
351  @Nullable()
352  public final Long getAssuredReplicationTimeoutMillis()
353  {
354    return resultHelper.getAssuredReplicationTimeoutMillis();
355  }
356
357
358
359  /**
360   * {@inheritDoc}
361   */
362  @Override()
363  @Nullable()
364  public final Boolean getResponseDelayedByAssurance()
365  {
366    return resultHelper.getResponseDelayedByAssurance();
367  }
368
369
370
371  /**
372   * {@inheritDoc}
373   */
374  @Override()
375  @NotNull()
376  public final Set<String> getIndexesWithKeysAccessedNearEntryLimit()
377  {
378    return resultHelper.getIndexesWithKeysAccessedNearEntryLimit();
379  }
380
381
382
383  /**
384   * {@inheritDoc}
385   */
386  @Override()
387  @NotNull()
388  public final Set<String> getIndexesWithKeysAccessedExceedingEntryLimit()
389  {
390    return resultHelper.getIndexesWithKeysAccessedExceedingEntryLimit();
391  }
392
393
394
395  /**
396   * Retrieves information about an intermediate client response control
397   * included in the log message.
398   *
399   * @return  An intermediate client response control included in the log
400   *          message, or {@code null} if no intermediate client response
401   *          control is available.
402   */
403  @Nullable()
404  public final JSONIntermediateClientResponseControl
405                    getIntermediateClientResponseControl()
406  {
407    return resultHelper.getIntermediateClientResponseControl();
408  }
409
410
411
412  /**
413   * {@inheritDoc}
414   */
415  @Override()
416  @Nullable()
417  public final String getTargetHost()
418  {
419    return forwardHelper.getTargetHost();
420  }
421
422
423
424  /**
425   * {@inheritDoc}
426   */
427  @Override()
428  @Nullable()
429  public final Integer getTargetPort()
430  {
431    return forwardHelper.getTargetPort();
432  }
433
434
435
436  /**
437   * {@inheritDoc}
438   */
439  @Override()
440  @Nullable()
441  public final String getTargetProtocol()
442  {
443    return forwardHelper.getTargetProtocol();
444  }
445}