ApiInterfacciaView.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.BaseItem;
  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 ApiInterfacciaView extends BaseItem {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private byte[] interfaccia = null;
  30.  
  31.   @Schema(required = true, description = "")
  32.   @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 )
  33.   @com.fasterxml.jackson.annotation.JsonSubTypes({
  34.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ApiInterfacciaRest.class, name = "rest"),
  35.     @com.fasterxml.jackson.annotation.JsonSubTypes.Type(value = ApiInterfacciaSoap.class, name = "soap")  })
  36.   private OneOfApiInterfacciaViewTipoInterfaccia tipoInterfaccia = null;
  37.  /**
  38.    * Get interfaccia
  39.    * @return interfaccia
  40.   **/
  41.   @JsonProperty("interfaccia")
  42.   @NotNull
  43.   @Valid
  44.   public byte[] getInterfaccia() {
  45.     return this.interfaccia;
  46.   }

  47.   public void setInterfaccia(byte[] interfaccia) {
  48.     this.interfaccia = interfaccia;
  49.   }

  50.   public ApiInterfacciaView interfaccia(byte[] interfaccia) {
  51.     this.interfaccia = interfaccia;
  52.     return this;
  53.   }

  54.  /**
  55.    * Get tipoInterfaccia
  56.    * @return tipoInterfaccia
  57.   **/
  58.   @JsonProperty("tipo_interfaccia")
  59.   @NotNull
  60.   @Valid
  61.   public OneOfApiInterfacciaViewTipoInterfaccia getTipoInterfaccia() {
  62.     return this.tipoInterfaccia;
  63.   }

  64.   public void setTipoInterfaccia(OneOfApiInterfacciaViewTipoInterfaccia tipoInterfaccia) {
  65.     this.tipoInterfaccia = tipoInterfaccia;
  66.   }

  67.   public ApiInterfacciaView tipoInterfaccia(OneOfApiInterfacciaViewTipoInterfaccia tipoInterfaccia) {
  68.     this.tipoInterfaccia = tipoInterfaccia;
  69.     return this;
  70.   }


  71.   @Override
  72.   public String toString() {
  73.     StringBuilder sb = new StringBuilder();
  74.     sb.append("class ApiInterfacciaView {\n");
  75.     sb.append("    ").append(ApiInterfacciaView.toIndentedString(super.toString())).append("\n");
  76.     sb.append("    interfaccia: ").append(ApiInterfacciaView.toIndentedString(this.interfaccia)).append("\n");
  77.     sb.append("    tipoInterfaccia: ").append(ApiInterfacciaView.toIndentedString(this.tipoInterfaccia)).append("\n");
  78.     sb.append("}");
  79.     return sb.toString();
  80.   }

  81.   /**
  82.    * Convert the given object to string with each line indented by 4 spaces
  83.    * (except the first line).
  84.    */
  85.   private static String toIndentedString(java.lang.Object o) {
  86.     if (o == null) {
  87.       return "null";
  88.     }
  89.     return o.toString().replace("\n", "\n    ");
  90.   }
  91. }