ApiImplUrlInvocazione.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 ApiImplUrlInvocazione  {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private ModalitaIdentificazioneAzioneEnum modalita = null;
  29.  
  30.   @Schema(description = "XPath/JsonPath nel caso di modalità 'content-based' o espressione regolare nel caso 'url-based'")
  31.  /**
  32.    * XPath/JsonPath nel caso di modalità 'content-based' o espressione regolare nel caso 'url-based'  
  33.   **/
  34.   private String pattern = null;
  35.  
  36.   @Schema(description = "Nome dell'header http nel caso di modalità 'header-based' o nome dell'unica azione in caso di modalità 'static'")
  37.  /**
  38.    * Nome dell'header http nel caso di modalità 'header-based' o nome dell'unica azione in caso di modalità 'static'  
  39.   **/
  40.   private String nome = null;
  41.  
  42.   @Schema(description = "Indicazione se oltre alla modalità indicata per individuare l'azione viene usata comunque la modalità 'interface-based'")
  43.  /**
  44.    * Indicazione se oltre alla modalità indicata per individuare l'azione viene usata comunque la modalità 'interface-based'  
  45.   **/
  46.   private Boolean forceInterface = true;
  47.  /**
  48.    * Get modalita
  49.    * @return modalita
  50.   **/
  51.   @JsonProperty("modalita")
  52.   @NotNull
  53.   @Valid
  54.   public ModalitaIdentificazioneAzioneEnum getModalita() {
  55.     return this.modalita;
  56.   }

  57.   public void setModalita(ModalitaIdentificazioneAzioneEnum modalita) {
  58.     this.modalita = modalita;
  59.   }

  60.   public ApiImplUrlInvocazione modalita(ModalitaIdentificazioneAzioneEnum modalita) {
  61.     this.modalita = modalita;
  62.     return this;
  63.   }

  64.  /**
  65.    * XPath/JsonPath nel caso di modalità 'content-based' o espressione regolare nel caso 'url-based'
  66.    * @return pattern
  67.   **/
  68.   @JsonProperty("pattern")
  69.   @Valid
  70.  @Size(max=255)  public String getPattern() {
  71.     return this.pattern;
  72.   }

  73.   public void setPattern(String pattern) {
  74.     this.pattern = pattern;
  75.   }

  76.   public ApiImplUrlInvocazione pattern(String pattern) {
  77.     this.pattern = pattern;
  78.     return this;
  79.   }

  80.  /**
  81.    * Nome dell'header http nel caso di modalità 'header-based' o nome dell'unica azione in caso di modalità 'static'
  82.    * @return nome
  83.   **/
  84.   @JsonProperty("nome")
  85.   @Valid
  86.  @Size(max=255)  public String getNome() {
  87.     return this.nome;
  88.   }

  89.   public void setNome(String nome) {
  90.     this.nome = nome;
  91.   }

  92.   public ApiImplUrlInvocazione nome(String nome) {
  93.     this.nome = nome;
  94.     return this;
  95.   }

  96.  /**
  97.    * Indicazione se oltre alla modalità indicata per individuare l'azione viene usata comunque la modalità 'interface-based'
  98.    * @return forceInterface
  99.   **/
  100.   @JsonProperty("force_interface")
  101.   @Valid
  102.   public Boolean isForceInterface() {
  103.     return this.forceInterface;
  104.   }

  105.   public void setForceInterface(Boolean forceInterface) {
  106.     this.forceInterface = forceInterface;
  107.   }

  108.   public ApiImplUrlInvocazione forceInterface(Boolean forceInterface) {
  109.     this.forceInterface = forceInterface;
  110.     return this;
  111.   }


  112.   @Override
  113.   public String toString() {
  114.     StringBuilder sb = new StringBuilder();
  115.     sb.append("class ApiImplUrlInvocazione {\n");
  116.    
  117.     sb.append("    modalita: ").append(ApiImplUrlInvocazione.toIndentedString(this.modalita)).append("\n");
  118.     sb.append("    pattern: ").append(ApiImplUrlInvocazione.toIndentedString(this.pattern)).append("\n");
  119.     sb.append("    nome: ").append(ApiImplUrlInvocazione.toIndentedString(this.nome)).append("\n");
  120.     sb.append("    forceInterface: ").append(ApiImplUrlInvocazione.toIndentedString(this.forceInterface)).append("\n");
  121.     sb.append("}");
  122.     return sb.toString();
  123.   }

  124.   /**
  125.    * Convert the given object to string with each line indented by 4 spaces
  126.    * (except the first line).
  127.    */
  128.   private static String toIndentedString(java.lang.Object o) {
  129.     if (o == null) {
  130.       return "null";
  131.     }
  132.     return o.toString().replace("\n", "\n    ");
  133.   }
  134. }