ProfiloCollaborazioneEnum.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.utils.service.beans;

  21. import com.fasterxml.jackson.annotation.JsonCreator;
  22. import com.fasterxml.jackson.annotation.JsonValue;
  23. import javax.xml.bind.annotation.XmlType;
  24. import javax.xml.bind.annotation.XmlEnum;
  25. import javax.xml.bind.annotation.XmlEnumValue;

  26. /**
  27.  * Gets or Sets ProfiloCollaborazioneEnum
  28.  */
  29. @XmlType(name="ProfiloCollaborazioneEnum")
  30. @XmlEnum(String.class)
  31. public enum ProfiloCollaborazioneEnum {
  32.   @XmlEnumValue("oneway")
  33. ONEWAY("oneway"),
  34.     @XmlEnumValue("sincrono")
  35. SINCRONO("sincrono"),
  36.     @XmlEnumValue("asincronoSimmetrico")
  37. ASINCRONOSIMMETRICO("asincronoSimmetrico"),
  38.     @XmlEnumValue("asincronoAsimmetrico")
  39. ASINCRONOASIMMETRICO("asincronoAsimmetrico");

  40.   private String value;

  41.   ProfiloCollaborazioneEnum(String value) {
  42.     this.value = value;
  43.   }

  44.   @Override
  45.   @JsonValue
  46.   public String toString() {
  47.     return String.valueOf(this.value);
  48.   }

  49.   @JsonCreator
  50.   public static ProfiloCollaborazioneEnum fromValue(String text) {
  51.     for (ProfiloCollaborazioneEnum b : ProfiloCollaborazioneEnum.values()) {
  52.       if (String.valueOf(b.value).equals(text)) {
  53.         return b;
  54.       }
  55.     }
  56.     return null;
  57.   }
  58.  
  59. }