ControlloAccessiAutenticazione.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 io.swagger.v3.oas.annotations.media.Schema;
  22. import com.fasterxml.jackson.annotation.JsonProperty;
  23. import javax.validation.Valid;

  24. public class ControlloAccessiAutenticazione extends ApiImplConfigurazioneStato {
  25.  
  26.   @Schema(description = "")
  27.   @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY, property = "tipo", visible = true )
  28.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  29.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneDisabilitata.class, name = "disabilitato"),
  30.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneBasic.class, name = "http-basic"),
  31.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneHttps.class, name = "https"),
  32.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazionePrincipal.class, name = "principal"),
  33.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneApiKey.class, name = "api-key"),
  34.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneCustom.class, name = "custom")  })
  35.   private OneOfControlloAccessiAutenticazioneAutenticazione autenticazione = null;
  36.  
  37.   @Schema(description = "")
  38.   private ControlloAccessiAutenticazioneToken token = null;
  39.  /**
  40.    * Get autenticazione
  41.    * @return autenticazione
  42.   **/
  43.   @JsonProperty("autenticazione")
  44.   @Valid
  45.   public OneOfControlloAccessiAutenticazioneAutenticazione getAutenticazione() {
  46.     return this.autenticazione;
  47.   }

  48.   public void setAutenticazione(OneOfControlloAccessiAutenticazioneAutenticazione autenticazione) {
  49.     this.autenticazione = autenticazione;
  50.   }

  51.   public ControlloAccessiAutenticazione autenticazione(OneOfControlloAccessiAutenticazioneAutenticazione autenticazione) {
  52.     this.autenticazione = autenticazione;
  53.     return this;
  54.   }

  55.  /**
  56.    * Get token
  57.    * @return token
  58.   **/
  59.   @JsonProperty("token")
  60.   @Valid
  61.   public ControlloAccessiAutenticazioneToken getToken() {
  62.     return this.token;
  63.   }

  64.   public void setToken(ControlloAccessiAutenticazioneToken token) {
  65.     this.token = token;
  66.   }

  67.   public ControlloAccessiAutenticazione token(ControlloAccessiAutenticazioneToken token) {
  68.     this.token = token;
  69.     return this;
  70.   }


  71.   @Override
  72.   public String toString() {
  73.     StringBuilder sb = new StringBuilder();
  74.     sb.append("class ControlloAccessiAutenticazione {\n");
  75.     sb.append("    ").append(ControlloAccessiAutenticazione.toIndentedString(super.toString())).append("\n");
  76.     sb.append("    autenticazione: ").append(ControlloAccessiAutenticazione.toIndentedString(this.autenticazione)).append("\n");
  77.     sb.append("    token: ").append(ControlloAccessiAutenticazione.toIndentedString(this.token)).append("\n");
  78.     sb.append("}");
  79.     return sb.toString();
  80.   }

  81.   /**
  82.    * Convert the given object to string with each line indented by 4 spaces
  83.    * (except the first line).
  84.    */
  85.   private static String toIndentedString(java.lang.Object o) {
  86.     if (o == null) {
  87.       return "null";
  88.     }
  89.     return o.toString().replace("\n", "\n    ");
  90.   }
  91. }