DimensioniReportCustomEnum.java

  1. /*
  2.  * GovWay - A customizable API Gateway
  3.  * https://govway.org
  4.  *
  5.  * Copyright (c) 2005-2025 Link.it srl (https://link.it).
  6.  *
  7.  * This program is free software: you can redistribute it and/or modify
  8.  * it under the terms of the GNU General Public License version 3, as published by
  9.  * the Free Software Foundation.
  10.  *
  11.  * This program is distributed in the hope that it will be useful,
  12.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.  * GNU General Public License for more details.
  15.  *
  16.  * You should have received a copy of the GNU General Public License
  17.  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  18.  *
  19.  */
  20. package org.openspcoop2.core.monitor.rs.server.model;

  21. import com.fasterxml.jackson.annotation.JsonCreator;
  22. import com.fasterxml.jackson.annotation.JsonValue;

  23. /**
  24.  * Gets or Sets DimensioniReportCustomEnum
  25.  */
  26. public enum DimensioniReportCustomEnum {
  27. TAG("tag"),
  28.   API("api"),
  29.   API_IMPLEMENTATION("api_implementation"),
  30.   OPERATION("operation"),
  31.   LOCAL_ORGANIZATION("local_organization"),
  32.   REMOTE_ORGANIZATION("remote_organization"),
  33.   CLIENT_ORGANIZATION("client_organization"),
  34.   PROVIDER_ORGANIZATION("provider_organization"),
  35.   TOKEN_ISSUER("token_issuer"),
  36.   TOKEN_CLIENTID("token_clientid"),
  37.   TOKEN_SUBJECT("token_subject"),
  38.   TOKEN_USERNAME("token_username"),
  39.   TOKEN_EMAIL("token_email"),
  40.   TOKEN_PDND_ORGANIZATION("token_pdnd_organization"),
  41.   PRINCIPAL("principal"),
  42.   CLIENT("client"),
  43.   TOKEN_CLIENT("token_client"),
  44.   IP_ADDRESS("ip_address"),
  45.   RESULT("result");

  46.   private String value;

  47.   DimensioniReportCustomEnum(String value) {
  48.     this.value = value;
  49.   }

  50.   @Override
  51.   @JsonValue
  52.   public String toString() {
  53.     return String.valueOf(this.value);
  54.   }

  55.   @JsonCreator
  56.   public static DimensioniReportCustomEnum fromValue(String text) {
  57.     for (DimensioniReportCustomEnum b : DimensioniReportCustomEnum.values()) {
  58.       if (String.valueOf(b.value).equals(text)) {
  59.         return b;
  60.       }
  61.     }
  62.     return null;
  63.   }
  64.  
  65. }