ApiReferenteView.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 ApiReferenteView extends BaseItem {
  27.  
  28.   @Schema(required = true, description = "")
  29.   private String referente = null;
  30.  /**
  31.    * Get referente
  32.    * @return referente
  33.   **/
  34.   @JsonProperty("referente")
  35.   @NotNull
  36.   @Valid
  37.  @Pattern(regexp="^[0-9A-Za-z][\\-A-Za-z0-9]*$") @Size(max=255)  public String getReferente() {
  38.     return this.referente;
  39.   }

  40.   public void setReferente(String referente) {
  41.     this.referente = referente;
  42.   }

  43.   public ApiReferenteView referente(String referente) {
  44.     this.referente = referente;
  45.     return this;
  46.   }


  47.   @Override
  48.   public String toString() {
  49.     StringBuilder sb = new StringBuilder();
  50.     sb.append("class ApiReferenteView {\n");
  51.     sb.append("    ").append(ApiReferenteView.toIndentedString(super.toString())).append("\n");
  52.     sb.append("    referente: ").append(ApiReferenteView.toIndentedString(this.referente)).append("\n");
  53.     sb.append("}");
  54.     return sb.toString();
  55.   }

  56.   /**
  57.    * Convert the given object to string with each line indented by 4 spaces
  58.    * (except the first line).
  59.    */
  60.   private static String toIndentedString(java.lang.Object o) {
  61.     if (o == null) {
  62.       return "null";
  63.     }
  64.     return o.toString().replace("\n", "\n    ");
  65.   }
  66. }