TransazioneExtContenutoMessaggioAllegato.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.utils.service.beans;

  21. import java.util.List;
  22. import javax.validation.constraints.*;

  23. import io.swagger.v3.oas.annotations.media.Schema;
  24. import javax.xml.bind.annotation.XmlElement;
  25. import javax.xml.bind.annotation.XmlRootElement;
  26. import javax.xml.bind.annotation.XmlAccessType;
  27. import javax.xml.bind.annotation.XmlAccessorType;
  28. import javax.xml.bind.annotation.XmlType;
  29. import com.fasterxml.jackson.annotation.JsonProperty;
  30. import javax.validation.Valid;

  31. @XmlAccessorType(XmlAccessType.FIELD)
  32.  @XmlType(name = "TransazioneExtContenutoMessaggioAllegato", propOrder =
  33.     { "contenuto", "contentType", "contentId", "contentLocation", "headers"
  34. })

  35. @XmlRootElement(name="TransazioneExtContenutoMessaggioAllegato")
  36. public class TransazioneExtContenutoMessaggioAllegato  {
  37.   @XmlElement(name="contenuto", required = true)
  38.  
  39.   @Schema(required = true, description = "")
  40.   private byte[] contenuto = null;
  41.   @XmlElement(name="content_type", required = true)
  42.  
  43.   @Schema(example = "application/json", required = true, description = "")
  44.   private String contentType = null;
  45.   @XmlElement(name="content_id")
  46.  
  47.   @Schema(description = "")
  48.   private String contentId = null;
  49.   @XmlElement(name="content_location")
  50.  
  51.   @Schema(description = "")
  52.   private String contentLocation = null;
  53.   @XmlElement(name="headers")
  54.  
  55.   @Schema(description = "")
  56.   private List<TransazioneContenutoMessaggioHeader> headers = null;
  57.  /**
  58.    * Get contenuto
  59.    * @return contenuto
  60.   **/
  61.   @JsonProperty("contenuto")
  62.   @NotNull
  63.   @Valid
  64.   public byte[] getContenuto() {
  65.     return this.contenuto;
  66.   }

  67.   public void setContenuto(byte[] contenuto) {
  68.     this.contenuto = contenuto;
  69.   }

  70.   public TransazioneExtContenutoMessaggioAllegato contenuto(byte[] contenuto) {
  71.     this.contenuto = contenuto;
  72.     return this;
  73.   }

  74.  /**
  75.    * Get contentType
  76.    * @return contentType
  77.   **/
  78.   @JsonProperty("content_type")
  79.   @NotNull
  80.   @Valid
  81.   public String getContentType() {
  82.     return this.contentType;
  83.   }

  84.   public void setContentType(String contentType) {
  85.     this.contentType = contentType;
  86.   }

  87.   public TransazioneExtContenutoMessaggioAllegato contentType(String contentType) {
  88.     this.contentType = contentType;
  89.     return this;
  90.   }

  91.  /**
  92.    * Get contentId
  93.    * @return contentId
  94.   **/
  95.   @JsonProperty("content_id")
  96.   @Valid
  97.   public String getContentId() {
  98.     return this.contentId;
  99.   }

  100.   public void setContentId(String contentId) {
  101.     this.contentId = contentId;
  102.   }

  103.   public TransazioneExtContenutoMessaggioAllegato contentId(String contentId) {
  104.     this.contentId = contentId;
  105.     return this;
  106.   }

  107.  /**
  108.    * Get contentLocation
  109.    * @return contentLocation
  110.   **/
  111.   @JsonProperty("content_location")
  112.   @Valid
  113.   public String getContentLocation() {
  114.     return this.contentLocation;
  115.   }

  116.   public void setContentLocation(String contentLocation) {
  117.     this.contentLocation = contentLocation;
  118.   }

  119.   public TransazioneExtContenutoMessaggioAllegato contentLocation(String contentLocation) {
  120.     this.contentLocation = contentLocation;
  121.     return this;
  122.   }

  123.  /**
  124.    * Get headers
  125.    * @return headers
  126.   **/
  127.   @JsonProperty("headers")
  128.   @Valid
  129.   public List<TransazioneContenutoMessaggioHeader> getHeaders() {
  130.     return this.headers;
  131.   }

  132.   public void setHeaders(List<TransazioneContenutoMessaggioHeader> headers) {
  133.     this.headers = headers;
  134.   }

  135.   public TransazioneExtContenutoMessaggioAllegato headers(List<TransazioneContenutoMessaggioHeader> headers) {
  136.     this.headers = headers;
  137.     return this;
  138.   }

  139.   public TransazioneExtContenutoMessaggioAllegato addHeadersItem(TransazioneContenutoMessaggioHeader headersItem) {
  140.     this.headers.add(headersItem);
  141.     return this;
  142.   }


  143.   @Override
  144.   public String toString() {
  145.     StringBuilder sb = new StringBuilder();
  146.     sb.append("class TransazioneExtContenutoMessaggioAllegato {\n");
  147.    
  148.     sb.append("    contenuto: ").append(TransazioneExtContenutoMessaggioAllegato.toIndentedString(this.contenuto)).append("\n");
  149.     sb.append("    contentType: ").append(TransazioneExtContenutoMessaggioAllegato.toIndentedString(this.contentType)).append("\n");
  150.     sb.append("    contentId: ").append(TransazioneExtContenutoMessaggioAllegato.toIndentedString(this.contentId)).append("\n");
  151.     sb.append("    contentLocation: ").append(TransazioneExtContenutoMessaggioAllegato.toIndentedString(this.contentLocation)).append("\n");
  152.     sb.append("    headers: ").append(TransazioneExtContenutoMessaggioAllegato.toIndentedString(this.headers)).append("\n");
  153.     sb.append("}");
  154.     return sb.toString();
  155.   }

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