TransazioneExtContenutoMessaggioBody.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 = "TransazioneExtContenutoMessaggioBody", propOrder =
  33.     { "formato", "contentType", "contentLength", "multipart", "contenutiBody"
  34. })

  35. @XmlRootElement(name="TransazioneExtContenutoMessaggioBody")
  36. public class TransazioneExtContenutoMessaggioBody  {
  37.   @XmlElement(name="formato")
  38.  
  39.   @Schema(description = "")
  40.   private TransazioneMessaggioFormatoEnum formato = 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_length")
  46.  
  47.   @Schema(description = "")
  48.   private Long contentLength = null;
  49.   @XmlElement(name="multipart")
  50.  
  51.   @Schema(description = "")
  52.   private TransazioneExtContenutoMessaggioBodyMultipart multipart = null;
  53.   @XmlElement(name="contenuti_body")
  54.  
  55.   @Schema(description = "")
  56.   private List<TransazioneExtContenutoMessaggioPorzioneBody> contenutiBody = null;
  57.  /**
  58.    * Get formato
  59.    * @return formato
  60.   **/
  61.   @JsonProperty("formato")
  62.   @Valid
  63.   public TransazioneMessaggioFormatoEnum getFormato() {
  64.     return this.formato;
  65.   }

  66.   public void setFormato(TransazioneMessaggioFormatoEnum formato) {
  67.     this.formato = formato;
  68.   }

  69.   public TransazioneExtContenutoMessaggioBody formato(TransazioneMessaggioFormatoEnum formato) {
  70.     this.formato = formato;
  71.     return this;
  72.   }

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

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

  86.   public TransazioneExtContenutoMessaggioBody contentType(String contentType) {
  87.     this.contentType = contentType;
  88.     return this;
  89.   }

  90.  /**
  91.    * Get contentLength
  92.    * @return contentLength
  93.   **/
  94.   @JsonProperty("content_length")
  95.   @Valid
  96.   public Long getContentLength() {
  97.     return this.contentLength;
  98.   }

  99.   public void setContentLength(Long contentLength) {
  100.     this.contentLength = contentLength;
  101.   }

  102.   public TransazioneExtContenutoMessaggioBody contentLength(Long contentLength) {
  103.     this.contentLength = contentLength;
  104.     return this;
  105.   }

  106.  /**
  107.    * Get multipart
  108.    * @return multipart
  109.   **/
  110.   @JsonProperty("multipart")
  111.   @Valid
  112.   public TransazioneExtContenutoMessaggioBodyMultipart getMultipart() {
  113.     return this.multipart;
  114.   }

  115.   public void setMultipart(TransazioneExtContenutoMessaggioBodyMultipart multipart) {
  116.     this.multipart = multipart;
  117.   }

  118.   public TransazioneExtContenutoMessaggioBody multipart(TransazioneExtContenutoMessaggioBodyMultipart multipart) {
  119.     this.multipart = multipart;
  120.     return this;
  121.   }

  122.  /**
  123.    * Get contenutiBody
  124.    * @return contenutiBody
  125.   **/
  126.   @JsonProperty("contenuti_body")
  127.   @Valid
  128.   public List<TransazioneExtContenutoMessaggioPorzioneBody> getContenutiBody() {
  129.     return this.contenutiBody;
  130.   }

  131.   public void setContenutiBody(List<TransazioneExtContenutoMessaggioPorzioneBody> contenutiBody) {
  132.     this.contenutiBody = contenutiBody;
  133.   }

  134.   public TransazioneExtContenutoMessaggioBody contenutiBody(List<TransazioneExtContenutoMessaggioPorzioneBody> contenutiBody) {
  135.     this.contenutiBody = contenutiBody;
  136.     return this;
  137.   }

  138.   public TransazioneExtContenutoMessaggioBody addContenutiBodyItem(TransazioneExtContenutoMessaggioPorzioneBody contenutiBodyItem) {
  139.     this.contenutiBody.add(contenutiBodyItem);
  140.     return this;
  141.   }


  142.   @Override
  143.   public String toString() {
  144.     StringBuilder sb = new StringBuilder();
  145.     sb.append("class TransazioneExtContenutoMessaggioBody {\n");
  146.    
  147.     sb.append("    formato: ").append(TransazioneExtContenutoMessaggioBody.toIndentedString(this.formato)).append("\n");
  148.     sb.append("    contentType: ").append(TransazioneExtContenutoMessaggioBody.toIndentedString(this.contentType)).append("\n");
  149.     sb.append("    contentLength: ").append(TransazioneExtContenutoMessaggioBody.toIndentedString(this.contentLength)).append("\n");
  150.     sb.append("    multipart: ").append(TransazioneExtContenutoMessaggioBody.toIndentedString(this.multipart)).append("\n");
  151.     sb.append("    contenutiBody: ").append(TransazioneExtContenutoMessaggioBody.toIndentedString(this.contenutiBody)).append("\n");
  152.     sb.append("}");
  153.     return sb.toString();
  154.   }

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