BaseCredenziali.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 BaseCredenziali  {
  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 = "modalita_accesso", visible = true )
  28.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  29.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AuthenticationHttpBasic.class, name = "http-basic"),
  30.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AuthenticationHttps.class, name = "https"),
  31.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AuthenticationPrincipal.class, name = "principal"),
  32.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AuthenticationApiKey.class, name = "api-key"),
  33.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = AuthenticationToken.class, name = "token")  })
  34.   private OneOfBaseCredenzialiCredenziali credenziali = null;
  35.  /**
  36.    * Get credenziali
  37.    * @return credenziali
  38.   **/
  39.   @JsonProperty("credenziali")
  40.   @Valid
  41.   public OneOfBaseCredenzialiCredenziali getCredenziali() {
  42.     return this.credenziali;
  43.   }

  44.   public void setCredenziali(OneOfBaseCredenzialiCredenziali credenziali) {
  45.     this.credenziali = credenziali;
  46.   }

  47.   public BaseCredenziali credenziali(OneOfBaseCredenzialiCredenziali credenziali) {
  48.     this.credenziali = credenziali;
  49.     return this;
  50.   }


  51.   @Override
  52.   public String toString() {
  53.     StringBuilder sb = new StringBuilder();
  54.     sb.append("class BaseCredenziali {\n");
  55.    
  56.     sb.append("    credenziali: ").append(BaseCredenziali.toIndentedString(this.credenziali)).append("\n");
  57.     sb.append("}");
  58.     return sb.toString();
  59.   }

  60.   /**
  61.    * Convert the given object to string with each line indented by 4 spaces
  62.    * (except the first line).
  63.    */
  64.   private static String toIndentedString(java.lang.Object o) {
  65.     if (o == null) {
  66.       return "null";
  67.     }
  68.     return o.toString().replace("\n", "\n    ");
  69.   }
  70. }