ApiServizio.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 org.openspcoop2.utils.service.beans.ProfiloCollaborazioneEnum;
  22. import javax.validation.constraints.*;

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

  26. public class ApiServizio  {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String nome = null;
  30.  
  31.   @Schema(description = "")
  32.   private String descrizione = null;
  33.  
  34.   @Schema(required = true, description = "")
  35.   private ProfiloCollaborazioneEnum profiloCollaborazione = null;
  36.  
  37.   @Schema(example = "false", description = "")
  38.   private Boolean idCollaborazione = false;
  39.  
  40.   @Schema(example = "false", description = "")
  41.   private Boolean riferimentoIdRichiesta = null;
  42.  /**
  43.    * Get nome
  44.    * @return nome
  45.   **/
  46.   @JsonProperty("nome")
  47.   @NotNull
  48.   @Valid
  49.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  50.     return this.nome;
  51.   }

  52.   public void setNome(String nome) {
  53.     this.nome = nome;
  54.   }

  55.   public ApiServizio nome(String nome) {
  56.     this.nome = nome;
  57.     return this;
  58.   }

  59.  /**
  60.    * Get descrizione
  61.    * @return descrizione
  62.   **/
  63.   @JsonProperty("descrizione")
  64.   @Valid
  65.  @Size(max=255)  public String getDescrizione() {
  66.     return this.descrizione;
  67.   }

  68.   public void setDescrizione(String descrizione) {
  69.     this.descrizione = descrizione;
  70.   }

  71.   public ApiServizio descrizione(String descrizione) {
  72.     this.descrizione = descrizione;
  73.     return this;
  74.   }

  75.  /**
  76.    * Get profiloCollaborazione
  77.    * @return profiloCollaborazione
  78.   **/
  79.   @JsonProperty("profilo_collaborazione")
  80.   @NotNull
  81.   @Valid
  82.   public ProfiloCollaborazioneEnum getProfiloCollaborazione() {
  83.     return this.profiloCollaborazione;
  84.   }

  85.   public void setProfiloCollaborazione(ProfiloCollaborazioneEnum profiloCollaborazione) {
  86.     this.profiloCollaborazione = profiloCollaborazione;
  87.   }

  88.   public ApiServizio profiloCollaborazione(ProfiloCollaborazioneEnum profiloCollaborazione) {
  89.     this.profiloCollaborazione = profiloCollaborazione;
  90.     return this;
  91.   }

  92.  /**
  93.    * Get idCollaborazione
  94.    * @return idCollaborazione
  95.   **/
  96.   @JsonProperty("id_collaborazione")
  97.   @Valid
  98.   public Boolean isIdCollaborazione() {
  99.     return this.idCollaborazione;
  100.   }

  101.   public void setIdCollaborazione(Boolean idCollaborazione) {
  102.     this.idCollaborazione = idCollaborazione;
  103.   }

  104.   public ApiServizio idCollaborazione(Boolean idCollaborazione) {
  105.     this.idCollaborazione = idCollaborazione;
  106.     return this;
  107.   }

  108.  /**
  109.    * Get riferimentoIdRichiesta
  110.    * @return riferimentoIdRichiesta
  111.   **/
  112.   @JsonProperty("riferimento_id_richiesta")
  113.   @Valid
  114.   public Boolean isRiferimentoIdRichiesta() {
  115.     return this.riferimentoIdRichiesta;
  116.   }

  117.   public void setRiferimentoIdRichiesta(Boolean riferimentoIdRichiesta) {
  118.     this.riferimentoIdRichiesta = riferimentoIdRichiesta;
  119.   }

  120.   public ApiServizio riferimentoIdRichiesta(Boolean riferimentoIdRichiesta) {
  121.     this.riferimentoIdRichiesta = riferimentoIdRichiesta;
  122.     return this;
  123.   }


  124.   @Override
  125.   public String toString() {
  126.     StringBuilder sb = new StringBuilder();
  127.     sb.append("class ApiServizio {\n");
  128.    
  129.     sb.append("    nome: ").append(ApiServizio.toIndentedString(this.nome)).append("\n");
  130.     sb.append("    descrizione: ").append(ApiServizio.toIndentedString(this.descrizione)).append("\n");
  131.     sb.append("    profiloCollaborazione: ").append(ApiServizio.toIndentedString(this.profiloCollaborazione)).append("\n");
  132.     sb.append("    idCollaborazione: ").append(ApiServizio.toIndentedString(this.idCollaborazione)).append("\n");
  133.     sb.append("    riferimentoIdRichiesta: ").append(ApiServizio.toIndentedString(this.riferimentoIdRichiesta)).append("\n");
  134.     sb.append("}");
  135.     return sb.toString();
  136.   }

  137.   /**
  138.    * Convert the given object to string with each line indented by 4 spaces
  139.    * (except the first line).
  140.    */
  141.   private static String toIndentedString(java.lang.Object o) {
  142.     if (o == null) {
  143.       return "null";
  144.     }
  145.     return o.toString().replace("\n", "\n    ");
  146.   }
  147. }