TransazioneContenutoMessaggio.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 io.swagger.v3.oas.annotations.media.Schema;
  23. import javax.xml.bind.annotation.XmlElement;
  24. import javax.xml.bind.annotation.XmlRootElement;
  25. import javax.xml.bind.annotation.XmlAccessType;
  26. import javax.xml.bind.annotation.XmlAccessorType;
  27. import javax.xml.bind.annotation.XmlType;
  28. import com.fasterxml.jackson.annotation.JsonProperty;
  29. import javax.validation.Valid;

  30. @XmlAccessorType(XmlAccessType.FIELD)
  31.  @XmlType(name = "TransazioneContenutoMessaggio", propOrder =
  32.     { "headers", "body"
  33. })

  34. @XmlRootElement(name="TransazioneContenutoMessaggio")
  35. public class TransazioneContenutoMessaggio  {
  36.   @XmlElement(name="headers")
  37.  
  38.   @Schema(description = "")
  39.   private List<TransazioneContenutoMessaggioHeader> headers = null;
  40.   @XmlElement(name="body")
  41.  
  42.   @Schema(description = "")
  43.   private byte[] body = null;
  44.  /**
  45.    * Get headers
  46.    * @return headers
  47.   **/
  48.   @JsonProperty("headers")
  49.   @Valid
  50.   public List<TransazioneContenutoMessaggioHeader> getHeaders() {
  51.     return this.headers;
  52.   }

  53.   public void setHeaders(List<TransazioneContenutoMessaggioHeader> headers) {
  54.     this.headers = headers;
  55.   }

  56.   public TransazioneContenutoMessaggio headers(List<TransazioneContenutoMessaggioHeader> headers) {
  57.     this.headers = headers;
  58.     return this;
  59.   }

  60.   public TransazioneContenutoMessaggio addHeadersItem(TransazioneContenutoMessaggioHeader headersItem) {
  61.     this.headers.add(headersItem);
  62.     return this;
  63.   }

  64.  /**
  65.    * Get body
  66.    * @return body
  67.   **/
  68.   @JsonProperty("body")
  69.   @Valid
  70.   public byte[] getBody() {
  71.     return this.body;
  72.   }

  73.   public void setBody(byte[] body) {
  74.     this.body = body;
  75.   }

  76.   public TransazioneContenutoMessaggio body(byte[] body) {
  77.     this.body = body;
  78.     return this;
  79.   }


  80.   @Override
  81.   public String toString() {
  82.     StringBuilder sb = new StringBuilder();
  83.     sb.append("class TransazioneContenutoMessaggio {\n");
  84.    
  85.     sb.append("    headers: ").append(TransazioneContenutoMessaggio.toIndentedString(this.headers)).append("\n");
  86.     sb.append("    body: ").append(TransazioneContenutoMessaggio.toIndentedString(this.body)).append("\n");
  87.     sb.append("}");
  88.     return sb.toString();
  89.   }

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