ModISicurezzaMessaggioRestAlgoritmoFirma.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.config.rs.server.model;

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

  23. /**
  24.  * Gets or Sets ModISicurezzaMessaggioRestAlgoritmoFirma
  25.  */
  26. public enum ModISicurezzaMessaggioRestAlgoritmoFirma {
  27. ES256("ES256"),
  28.   ES384("ES384"),
  29.   ES512("ES512"),
  30.   RS256("RS256"),
  31.   RS384("RS384"),
  32.   RS512("RS512");

  33.   private String value;

  34.   ModISicurezzaMessaggioRestAlgoritmoFirma(String value) {
  35.     this.value = value;
  36.   }

  37.   @Override
  38.   @JsonValue
  39.   public String toString() {
  40.     return String.valueOf(this.value);
  41.   }

  42.   @JsonCreator
  43.   public static ModISicurezzaMessaggioRestAlgoritmoFirma fromValue(String text) {
  44.     for (ModISicurezzaMessaggioRestAlgoritmoFirma b : ModISicurezzaMessaggioRestAlgoritmoFirma.values()) {
  45.       if (String.valueOf(b.value).equals(text)) {
  46.         return b;
  47.       }
  48.     }
  49.     return null;
  50.   }
  51.  
  52. }