ApiRisorsa.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 ApiRisorsa  {
  26.  
  27.   @Schema(required = true, description = "")
  28.   private HttpMethodEnum httpMethod = null;
  29.  
  30.   @Schema(example = "/libri", required = true, description = "")
  31.   private String path = null;
  32.  
  33.   @Schema(description = "")
  34.   private String nome = null;
  35.  
  36.   @Schema(description = "")
  37.   private String descrizione = null;
  38.  
  39.   @Schema(example = "false", description = "")
  40.   private Boolean idCollaborazione = false;
  41.  
  42.   @Schema(example = "false", description = "")
  43.   private Boolean riferimentoIdRichiesta = null;
  44.  
  45.   @Schema(description = "")
  46.   private ApiModIRisorsaRest modi = null;
  47.  /**
  48.    * Get httpMethod
  49.    * @return httpMethod
  50.   **/
  51.   @JsonProperty("http_method")
  52.   @NotNull
  53.   @Valid
  54.   public HttpMethodEnum getHttpMethod() {
  55.     return this.httpMethod;
  56.   }

  57.   public void setHttpMethod(HttpMethodEnum httpMethod) {
  58.     this.httpMethod = httpMethod;
  59.   }

  60.   public ApiRisorsa httpMethod(HttpMethodEnum httpMethod) {
  61.     this.httpMethod = httpMethod;
  62.     return this;
  63.   }

  64.  /**
  65.    * Get path
  66.    * @return path
  67.   **/
  68.   @JsonProperty("path")
  69.   @NotNull
  70.   @Valid
  71.  @Size(max=255)  public String getPath() {
  72.     return this.path;
  73.   }

  74.   public void setPath(String path) {
  75.     this.path = path;
  76.   }

  77.   public ApiRisorsa path(String path) {
  78.     this.path = path;
  79.     return this;
  80.   }

  81.  /**
  82.    * Get nome
  83.    * @return nome
  84.   **/
  85.   @JsonProperty("nome")
  86.   @Valid
  87.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getNome() {
  88.     return this.nome;
  89.   }

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

  93.   public ApiRisorsa nome(String nome) {
  94.     this.nome = nome;
  95.     return this;
  96.   }

  97.  /**
  98.    * Get descrizione
  99.    * @return descrizione
  100.   **/
  101.   @JsonProperty("descrizione")
  102.   @Valid
  103.  @Size(max=255)  public String getDescrizione() {
  104.     return this.descrizione;
  105.   }

  106.   public void setDescrizione(String descrizione) {
  107.     this.descrizione = descrizione;
  108.   }

  109.   public ApiRisorsa descrizione(String descrizione) {
  110.     this.descrizione = descrizione;
  111.     return this;
  112.   }

  113.  /**
  114.    * Get idCollaborazione
  115.    * @return idCollaborazione
  116.   **/
  117.   @JsonProperty("id_collaborazione")
  118.   @Valid
  119.   public Boolean isIdCollaborazione() {
  120.     return this.idCollaborazione;
  121.   }

  122.   public void setIdCollaborazione(Boolean idCollaborazione) {
  123.     this.idCollaborazione = idCollaborazione;
  124.   }

  125.   public ApiRisorsa idCollaborazione(Boolean idCollaborazione) {
  126.     this.idCollaborazione = idCollaborazione;
  127.     return this;
  128.   }

  129.  /**
  130.    * Get riferimentoIdRichiesta
  131.    * @return riferimentoIdRichiesta
  132.   **/
  133.   @JsonProperty("riferimento_id_richiesta")
  134.   @Valid
  135.   public Boolean isRiferimentoIdRichiesta() {
  136.     return this.riferimentoIdRichiesta;
  137.   }

  138.   public void setRiferimentoIdRichiesta(Boolean riferimentoIdRichiesta) {
  139.     this.riferimentoIdRichiesta = riferimentoIdRichiesta;
  140.   }

  141.   public ApiRisorsa riferimentoIdRichiesta(Boolean riferimentoIdRichiesta) {
  142.     this.riferimentoIdRichiesta = riferimentoIdRichiesta;
  143.     return this;
  144.   }

  145.  /**
  146.    * Get modi
  147.    * @return modi
  148.   **/
  149.   @JsonProperty("modi")
  150.   @Valid
  151.   public ApiModIRisorsaRest getModi() {
  152.     return this.modi;
  153.   }

  154.   public void setModi(ApiModIRisorsaRest modi) {
  155.     this.modi = modi;
  156.   }

  157.   public ApiRisorsa modi(ApiModIRisorsaRest modi) {
  158.     this.modi = modi;
  159.     return this;
  160.   }


  161.   @Override
  162.   public String toString() {
  163.     StringBuilder sb = new StringBuilder();
  164.     sb.append("class ApiRisorsa {\n");
  165.    
  166.     sb.append("    httpMethod: ").append(ApiRisorsa.toIndentedString(this.httpMethod)).append("\n");
  167.     sb.append("    path: ").append(ApiRisorsa.toIndentedString(this.path)).append("\n");
  168.     sb.append("    nome: ").append(ApiRisorsa.toIndentedString(this.nome)).append("\n");
  169.     sb.append("    descrizione: ").append(ApiRisorsa.toIndentedString(this.descrizione)).append("\n");
  170.     sb.append("    idCollaborazione: ").append(ApiRisorsa.toIndentedString(this.idCollaborazione)).append("\n");
  171.     sb.append("    riferimentoIdRichiesta: ").append(ApiRisorsa.toIndentedString(this.riferimentoIdRichiesta)).append("\n");
  172.     sb.append("    modi: ").append(ApiRisorsa.toIndentedString(this.modi)).append("\n");
  173.     sb.append("}");
  174.     return sb.toString();
  175.   }

  176.   /**
  177.    * Convert the given object to string with each line indented by 4 spaces
  178.    * (except the first line).
  179.    */
  180.   private static String toIndentedString(java.lang.Object o) {
  181.     if (o == null) {
  182.       return "null";
  183.     }
  184.     return o.toString().replace("\n", "\n    ");
  185.   }
  186. }