ApiImplVersioneApiView.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 java.util.ArrayList;
  22. import java.util.List;
  23. import org.openspcoop2.utils.service.beans.BaseSoggettoItem;
  24. import javax.validation.constraints.*;

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

  28. public class ApiImplVersioneApiView extends BaseSoggettoItem {
  29.  
  30.   @Schema(required = true, description = "")
  31.   private String apiNome = null;
  32.  
  33.   @Schema(required = true, description = "")
  34.   private Integer apiVersione = null;
  35.  
  36.   @Schema(description = "")
  37.   private String apiReferente = null;
  38.  
  39.   @Schema(description = "")
  40.   private String apiSoapServizio = null;
  41.  
  42.   @Schema(example = "[\"PagamentiTelematici\",\"Anagrafica\"]", description = "")
  43.   private List<String> apiTags = null;
  44.  
  45.   @Schema(description = "")
  46.   private String tipoServizio = null;
  47.  
  48.   @Schema(example = "[1,2,3]", required = true, description = "")
  49.   private List<Integer> versioni = new ArrayList<>();
  50.  /**
  51.    * Get apiNome
  52.    * @return apiNome
  53.   **/
  54.   @JsonProperty("api_nome")
  55.   @NotNull
  56.   @Valid
  57.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getApiNome() {
  58.     return this.apiNome;
  59.   }

  60.   public void setApiNome(String apiNome) {
  61.     this.apiNome = apiNome;
  62.   }

  63.   public ApiImplVersioneApiView apiNome(String apiNome) {
  64.     this.apiNome = apiNome;
  65.     return this;
  66.   }

  67.  /**
  68.    * Get apiVersione
  69.    * @return apiVersione
  70.   **/
  71.   @JsonProperty("api_versione")
  72.   @NotNull
  73.   @Valid
  74.   public Integer getApiVersione() {
  75.     return this.apiVersione;
  76.   }

  77.   public void setApiVersione(Integer apiVersione) {
  78.     this.apiVersione = apiVersione;
  79.   }

  80.   public ApiImplVersioneApiView apiVersione(Integer apiVersione) {
  81.     this.apiVersione = apiVersione;
  82.     return this;
  83.   }

  84.  /**
  85.    * Get apiReferente
  86.    * @return apiReferente
  87.   **/
  88.   @JsonProperty("api_referente")
  89.   @Valid
  90.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getApiReferente() {
  91.     return this.apiReferente;
  92.   }

  93.   public void setApiReferente(String apiReferente) {
  94.     this.apiReferente = apiReferente;
  95.   }

  96.   public ApiImplVersioneApiView apiReferente(String apiReferente) {
  97.     this.apiReferente = apiReferente;
  98.     return this;
  99.   }

  100.  /**
  101.    * Get apiSoapServizio
  102.    * @return apiSoapServizio
  103.   **/
  104.   @JsonProperty("api_soap_servizio")
  105.   @Valid
  106.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getApiSoapServizio() {
  107.     return this.apiSoapServizio;
  108.   }

  109.   public void setApiSoapServizio(String apiSoapServizio) {
  110.     this.apiSoapServizio = apiSoapServizio;
  111.   }

  112.   public ApiImplVersioneApiView apiSoapServizio(String apiSoapServizio) {
  113.     this.apiSoapServizio = apiSoapServizio;
  114.     return this;
  115.   }

  116.  /**
  117.    * Get apiTags
  118.    * @return apiTags
  119.   **/
  120.   @JsonProperty("api_tags")
  121.   @Valid
  122.   public List<String> getApiTags() {
  123.     return this.apiTags;
  124.   }

  125.   public void setApiTags(List<String> apiTags) {
  126.     this.apiTags = apiTags;
  127.   }

  128.   public ApiImplVersioneApiView apiTags(List<String> apiTags) {
  129.     this.apiTags = apiTags;
  130.     return this;
  131.   }

  132.   public ApiImplVersioneApiView addApiTagsItem(String apiTagsItem) {
  133.     this.apiTags.add(apiTagsItem);
  134.     return this;
  135.   }

  136.  /**
  137.    * Get tipoServizio
  138.    * @return tipoServizio
  139.   **/
  140.   @JsonProperty("tipo_servizio")
  141.   @Valid
  142.  @Pattern(regexp="^[a-z]{2,20}$") @Size(max=20)  public String getTipoServizio() {
  143.     return this.tipoServizio;
  144.   }

  145.   public void setTipoServizio(String tipoServizio) {
  146.     this.tipoServizio = tipoServizio;
  147.   }

  148.   public ApiImplVersioneApiView tipoServizio(String tipoServizio) {
  149.     this.tipoServizio = tipoServizio;
  150.     return this;
  151.   }

  152.  /**
  153.    * Get versioni
  154.    * @return versioni
  155.   **/
  156.   @JsonProperty("versioni")
  157.   @NotNull
  158.   @Valid
  159.   public List<Integer> getVersioni() {
  160.     return this.versioni;
  161.   }

  162.   public void setVersioni(List<Integer> versioni) {
  163.     this.versioni = versioni;
  164.   }

  165.   public ApiImplVersioneApiView versioni(List<Integer> versioni) {
  166.     this.versioni = versioni;
  167.     return this;
  168.   }

  169.   public ApiImplVersioneApiView addVersioniItem(Integer versioniItem) {
  170.     this.versioni.add(versioniItem);
  171.     return this;
  172.   }


  173.   @Override
  174.   public String toString() {
  175.     StringBuilder sb = new StringBuilder();
  176.     sb.append("class ApiImplVersioneApiView {\n");
  177.     sb.append("    ").append(ApiImplVersioneApiView.toIndentedString(super.toString())).append("\n");
  178.     sb.append("    apiNome: ").append(ApiImplVersioneApiView.toIndentedString(this.apiNome)).append("\n");
  179.     sb.append("    apiVersione: ").append(ApiImplVersioneApiView.toIndentedString(this.apiVersione)).append("\n");
  180.     sb.append("    apiReferente: ").append(ApiImplVersioneApiView.toIndentedString(this.apiReferente)).append("\n");
  181.     sb.append("    apiSoapServizio: ").append(ApiImplVersioneApiView.toIndentedString(this.apiSoapServizio)).append("\n");
  182.     sb.append("    apiTags: ").append(ApiImplVersioneApiView.toIndentedString(this.apiTags)).append("\n");
  183.     sb.append("    tipoServizio: ").append(ApiImplVersioneApiView.toIndentedString(this.tipoServizio)).append("\n");
  184.     sb.append("    versioni: ").append(ApiImplVersioneApiView.toIndentedString(this.versioni)).append("\n");
  185.     sb.append("}");
  186.     return sb.toString();
  187.   }

  188.   /**
  189.    * Convert the given object to string with each line indented by 4 spaces
  190.    * (except the first line).
  191.    */
  192.   private static String toIndentedString(java.lang.Object o) {
  193.     if (o == null) {
  194.       return "null";
  195.     }
  196.     return o.toString().replace("\n", "\n    ");
  197.   }
  198. }