Api.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 Api extends ApiBase {
  26.  
  27.   @Schema(description = "")
  28.   private byte[] interfaccia = null;
  29.  
  30.   @Schema(description = "")
  31.   private String canale = null;
  32.  
  33.   @Schema(description = "")
  34.   private ApiModI modi = null;
  35.  /**
  36.    * Get interfaccia
  37.    * @return interfaccia
  38.   **/
  39.   @JsonProperty("interfaccia")
  40.   @Valid
  41.   public byte[] getInterfaccia() {
  42.     return this.interfaccia;
  43.   }

  44.   public void setInterfaccia(byte[] interfaccia) {
  45.     this.interfaccia = interfaccia;
  46.   }

  47.   public Api interfaccia(byte[] interfaccia) {
  48.     this.interfaccia = interfaccia;
  49.     return this;
  50.   }

  51.  /**
  52.    * Get canale
  53.    * @return canale
  54.   **/
  55.   @JsonProperty("canale")
  56.   @Valid
  57.  @Pattern(regexp="^[^\\s]+$") @Size(max=255)  public String getCanale() {
  58.     return this.canale;
  59.   }

  60.   public void setCanale(String canale) {
  61.     this.canale = canale;
  62.   }

  63.   public Api canale(String canale) {
  64.     this.canale = canale;
  65.     return this;
  66.   }

  67.  /**
  68.    * Get modi
  69.    * @return modi
  70.   **/
  71.   @JsonProperty("modi")
  72.   @Valid
  73.   public ApiModI getModi() {
  74.     return this.modi;
  75.   }

  76.   public void setModi(ApiModI modi) {
  77.     this.modi = modi;
  78.   }

  79.   public Api modi(ApiModI modi) {
  80.     this.modi = modi;
  81.     return this;
  82.   }


  83.   @Override
  84.   public String toString() {
  85.     StringBuilder sb = new StringBuilder();
  86.     sb.append("class Api {\n");
  87.     sb.append("    ").append(Api.toIndentedString(super.toString())).append("\n");
  88.     sb.append("    interfaccia: ").append(Api.toIndentedString(this.interfaccia)).append("\n");
  89.     sb.append("    canale: ").append(Api.toIndentedString(this.canale)).append("\n");
  90.     sb.append("    modi: ").append(Api.toIndentedString(this.modi)).append("\n");
  91.     sb.append("}");
  92.     return sb.toString();
  93.   }

  94.   /**
  95.    * Convert the given object to string with each line indented by 4 spaces
  96.    * (except the first line).
  97.    */
  98.   private static String toIndentedString(java.lang.Object o) {
  99.     if (o == null) {
  100.       return "null";
  101.     }
  102.     return o.toString().replace("\n", "\n    ");
  103.   }
  104. }