APIImpl.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 javax.validation.constraints.*;

  22. import io.swagger.v3.oas.annotations.media.Schema;
  23. import com.fasterxml.jackson.annotation.JsonProperty;
  24. import javax.validation.Valid;

  25. public class APIImpl extends APIBaseImpl {
  26.  
  27.   @Schema(description = "")
  28.   @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 )
  29.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  30.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneDisabilitata.class, name = "disabilitato"),
  31.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneBasic.class, name = "http-basic"),
  32.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneHttps.class, name = "https"),
  33.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazionePrincipal.class, name = "principal"),
  34.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutenticazioneApiKey.class, name = "api-key")  })
  35.   private OneOfAPIImplAutenticazione autenticazione = null;
  36.  
  37.   @Schema(description = "")
  38.   @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 )
  39.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  40.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutorizzazioneDisabilitata.class, name = "disabilitato"),
  41.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutorizzazioneAbilitataNew.class, name = "abilitato"),
  42.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = APIImplAutorizzazioneXACML.class, name = "xacml-Policy")  })
  43.   private OneOfAPIImplAutorizzazione autorizzazione = null;
  44.  
  45.   @Schema(required = true, description = "")
  46.   private BaseConnettoreHttp connettore = null;
  47.  /**
  48.    * Get autenticazione
  49.    * @return autenticazione
  50.   **/
  51.   @JsonProperty("autenticazione")
  52.   @Valid
  53.   public OneOfAPIImplAutenticazione getAutenticazione() {
  54.     return this.autenticazione;
  55.   }

  56.   public void setAutenticazione(OneOfAPIImplAutenticazione autenticazione) {
  57.     this.autenticazione = autenticazione;
  58.   }

  59.   public APIImpl autenticazione(OneOfAPIImplAutenticazione autenticazione) {
  60.     this.autenticazione = autenticazione;
  61.     return this;
  62.   }

  63.  /**
  64.    * Get autorizzazione
  65.    * @return autorizzazione
  66.   **/
  67.   @JsonProperty("autorizzazione")
  68.   @Valid
  69.   public OneOfAPIImplAutorizzazione getAutorizzazione() {
  70.     return this.autorizzazione;
  71.   }

  72.   public void setAutorizzazione(OneOfAPIImplAutorizzazione autorizzazione) {
  73.     this.autorizzazione = autorizzazione;
  74.   }

  75.   public APIImpl autorizzazione(OneOfAPIImplAutorizzazione autorizzazione) {
  76.     this.autorizzazione = autorizzazione;
  77.     return this;
  78.   }

  79.  /**
  80.    * Get connettore
  81.    * @return connettore
  82.   **/
  83.   @JsonProperty("connettore")
  84.   @NotNull
  85.   @Valid
  86.   public BaseConnettoreHttp getConnettore() {
  87.     return this.connettore;
  88.   }

  89.   public void setConnettore(BaseConnettoreHttp connettore) {
  90.     this.connettore = connettore;
  91.   }

  92.   public APIImpl connettore(BaseConnettoreHttp connettore) {
  93.     this.connettore = connettore;
  94.     return this;
  95.   }


  96.   @Override
  97.   public String toString() {
  98.     StringBuilder sb = new StringBuilder();
  99.     sb.append("class APIImpl {\n");
  100.     sb.append("    ").append(APIImpl.toIndentedString(super.toString())).append("\n");
  101.     sb.append("    autenticazione: ").append(APIImpl.toIndentedString(this.autenticazione)).append("\n");
  102.     sb.append("    autorizzazione: ").append(APIImpl.toIndentedString(this.autorizzazione)).append("\n");
  103.     sb.append("    connettore: ").append(APIImpl.toIndentedString(this.connettore)).append("\n");
  104.     sb.append("}");
  105.     return sb.toString();
  106.   }

  107.   /**
  108.    * Convert the given object to string with each line indented by 4 spaces
  109.    * (except the first line).
  110.    */
  111.   private static String toIndentedString(java.lang.Object o) {
  112.     if (o == null) {
  113.       return "null";
  114.     }
  115.     return o.toString().replace("\n", "\n    ");
  116.   }
  117. }