Fruizione.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 Fruizione extends APIImpl {
  26.  
  27.   @Schema(description = "")
  28.   private String descrizione = null;
  29.  
  30.   @Schema(description = "")
  31.   private String fruizioneNome = null;
  32.  
  33.   @Schema(description = "")
  34.   private Integer fruizioneVersione = null;
  35.  
  36.   @Schema(required = true, description = "")
  37.   private String erogatore = null;
  38.  
  39.   @Schema(description = "")
  40.   private String canale = null;
  41.  
  42.   @Schema(description = "")
  43.   @com.fasterxml.jackson.annotation.JsonTypeInfo(use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXISTING_PROPERTY, property = "protocollo", visible = true )
  44.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  45.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = FruizioneModIOAuth.class, name = "oauth"),
  46.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = FruizioneModISoap.class, name = "soap"),
  47.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = FruizioneModIRest.class, name = "rest")  })
  48.   private OneOfFruizioneModi modi = null;
  49.  /**
  50.    * Get descrizione
  51.    * @return descrizione
  52.   **/
  53.   @JsonProperty("descrizione")
  54.   @Valid
  55.  @Size(max=4000)  public String getDescrizione() {
  56.     return this.descrizione;
  57.   }

  58.   public void setDescrizione(String descrizione) {
  59.     this.descrizione = descrizione;
  60.   }

  61.   public Fruizione descrizione(String descrizione) {
  62.     this.descrizione = descrizione;
  63.     return this;
  64.   }

  65.  /**
  66.    * Get fruizioneNome
  67.    * @return fruizioneNome
  68.   **/
  69.   @JsonProperty("fruizione_nome")
  70.   @Valid
  71.  @Pattern(regexp="^[_A-Za-z][\\-\\._A-Za-z0-9]*$") @Size(max=255)  public String getFruizioneNome() {
  72.     return this.fruizioneNome;
  73.   }

  74.   public void setFruizioneNome(String fruizioneNome) {
  75.     this.fruizioneNome = fruizioneNome;
  76.   }

  77.   public Fruizione fruizioneNome(String fruizioneNome) {
  78.     this.fruizioneNome = fruizioneNome;
  79.     return this;
  80.   }

  81.  /**
  82.    * Get fruizioneVersione
  83.    * @return fruizioneVersione
  84.   **/
  85.   @JsonProperty("fruizione_versione")
  86.   @Valid
  87.   public Integer getFruizioneVersione() {
  88.     return this.fruizioneVersione;
  89.   }

  90.   public void setFruizioneVersione(Integer fruizioneVersione) {
  91.     this.fruizioneVersione = fruizioneVersione;
  92.   }

  93.   public Fruizione fruizioneVersione(Integer fruizioneVersione) {
  94.     this.fruizioneVersione = fruizioneVersione;
  95.     return this;
  96.   }

  97.  /**
  98.    * Get erogatore
  99.    * @return erogatore
  100.   **/
  101.   @JsonProperty("erogatore")
  102.   @NotNull
  103.   @Valid
  104.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getErogatore() {
  105.     return this.erogatore;
  106.   }

  107.   public void setErogatore(String erogatore) {
  108.     this.erogatore = erogatore;
  109.   }

  110.   public Fruizione erogatore(String erogatore) {
  111.     this.erogatore = erogatore;
  112.     return this;
  113.   }

  114.  /**
  115.    * Get canale
  116.    * @return canale
  117.   **/
  118.   @JsonProperty("canale")
  119.   @Valid
  120.  @Pattern(regexp="^[^\\s]+$") @Size(max=255)  public String getCanale() {
  121.     return this.canale;
  122.   }

  123.   public void setCanale(String canale) {
  124.     this.canale = canale;
  125.   }

  126.   public Fruizione canale(String canale) {
  127.     this.canale = canale;
  128.     return this;
  129.   }

  130.  /**
  131.    * Get modi
  132.    * @return modi
  133.   **/
  134.   @JsonProperty("modi")
  135.   @Valid
  136.   public OneOfFruizioneModi getModi() {
  137.     return this.modi;
  138.   }

  139.   public void setModi(OneOfFruizioneModi modi) {
  140.     this.modi = modi;
  141.   }

  142.   public Fruizione modi(OneOfFruizioneModi modi) {
  143.     this.modi = modi;
  144.     return this;
  145.   }


  146.   @Override
  147.   public String toString() {
  148.     StringBuilder sb = new StringBuilder();
  149.     sb.append("class Fruizione {\n");
  150.     sb.append("    ").append(Fruizione.toIndentedString(super.toString())).append("\n");
  151.     sb.append("    descrizione: ").append(Fruizione.toIndentedString(this.descrizione)).append("\n");
  152.     sb.append("    fruizioneNome: ").append(Fruizione.toIndentedString(this.fruizioneNome)).append("\n");
  153.     sb.append("    fruizioneVersione: ").append(Fruizione.toIndentedString(this.fruizioneVersione)).append("\n");
  154.     sb.append("    erogatore: ").append(Fruizione.toIndentedString(this.erogatore)).append("\n");
  155.     sb.append("    canale: ").append(Fruizione.toIndentedString(this.canale)).append("\n");
  156.     sb.append("    modi: ").append(Fruizione.toIndentedString(this.modi)).append("\n");
  157.     sb.append("}");
  158.     return sb.toString();
  159.   }

  160.   /**
  161.    * Convert the given object to string with each line indented by 4 spaces
  162.    * (except the first line).
  163.    */
  164.   private static String toIndentedString(java.lang.Object o) {
  165.     if (o == null) {
  166.       return "null";
  167.     }
  168.     return o.toString().replace("\n", "\n    ");
  169.   }
  170. }