ServiceType.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.protocol.manifest;

  21. import javax.xml.bind.annotation.XmlAccessType;
  22. import javax.xml.bind.annotation.XmlAccessorType;
  23. import javax.xml.bind.annotation.XmlAttribute;
  24. import javax.xml.bind.annotation.XmlElement;
  25. import javax.xml.bind.annotation.XmlRootElement;
  26. import javax.xml.bind.annotation.XmlType;
  27. import org.openspcoop2.protocol.manifest.constants.MessageType;
  28. import org.openspcoop2.protocol.manifest.constants.ServiceBinding;
  29. import java.io.Serializable;


  30. /** <p>Java class for ServiceType complex type.
  31.  *
  32.  * <p>The following schema fragment specifies the expected content contained within this class.
  33.  *
  34.  * <pre>
  35.  * &lt;complexType name="ServiceType"&gt;
  36.  *      &lt;sequence&gt;
  37.  *          &lt;element name="soapMediaTypeCollection" type="{http://www.openspcoop2.org/protocol/manifest}SoapMediaTypeCollection" minOccurs="0" maxOccurs="1"/&gt;
  38.  *          &lt;element name="restMediaTypeCollection" type="{http://www.openspcoop2.org/protocol/manifest}RestMediaTypeCollection" minOccurs="0" maxOccurs="1"/&gt;
  39.  *      &lt;/sequence&gt;
  40.  *      &lt;attribute name="name" type="{http://www.w3.org/2001/XMLSchema}string" use="required"/&gt;
  41.  *      &lt;attribute name="protocol" type="{http://www.w3.org/2001/XMLSchema}string" use="optional"/&gt;
  42.  *      &lt;attribute name="messageType" type="{http://www.openspcoop2.org/protocol/manifest}MessageType" use="optional"/&gt;
  43.  *      &lt;attribute name="binding" type="{http://www.openspcoop2.org/protocol/manifest}ServiceBinding" use="optional"/&gt;
  44.  * &lt;/complexType&gt;
  45.  * </pre>
  46.  *
  47.  * @version $Rev$, $Date$
  48.  *
  49.  * @author Poli Andrea (poli@link.it)
  50.  * @author $Author$
  51.  * */

  52. @XmlAccessorType(XmlAccessType.FIELD)
  53. @XmlType(name = "ServiceType",
  54.   propOrder = {
  55.     "soapMediaTypeCollection",
  56.     "restMediaTypeCollection"
  57.   }
  58. )

  59. @XmlRootElement(name = "ServiceType")

  60. public class ServiceType extends org.openspcoop2.utils.beans.BaseBean implements Serializable , Cloneable {
  61.   public ServiceType() {
  62.     super();
  63.   }

  64.   public SoapMediaTypeCollection getSoapMediaTypeCollection() {
  65.     return this.soapMediaTypeCollection;
  66.   }

  67.   public void setSoapMediaTypeCollection(SoapMediaTypeCollection soapMediaTypeCollection) {
  68.     this.soapMediaTypeCollection = soapMediaTypeCollection;
  69.   }

  70.   public RestMediaTypeCollection getRestMediaTypeCollection() {
  71.     return this.restMediaTypeCollection;
  72.   }

  73.   public void setRestMediaTypeCollection(RestMediaTypeCollection restMediaTypeCollection) {
  74.     this.restMediaTypeCollection = restMediaTypeCollection;
  75.   }

  76.   public java.lang.String getName() {
  77.     return this.name;
  78.   }

  79.   public void setName(java.lang.String name) {
  80.     this.name = name;
  81.   }

  82.   public java.lang.String getProtocol() {
  83.     return this.protocol;
  84.   }

  85.   public void setProtocol(java.lang.String protocol) {
  86.     this.protocol = protocol;
  87.   }

  88.   public void setMessageTypeRawEnumValue(String value) {
  89.     this.messageType = (MessageType) MessageType.toEnumConstantFromString(value);
  90.   }

  91.   public String getMessageTypeRawEnumValue() {
  92.     if(this.messageType == null){
  93.         return null;
  94.     }else{
  95.         return this.messageType.toString();
  96.     }
  97.   }

  98.   public org.openspcoop2.protocol.manifest.constants.MessageType getMessageType() {
  99.     return this.messageType;
  100.   }

  101.   public void setMessageType(org.openspcoop2.protocol.manifest.constants.MessageType messageType) {
  102.     this.messageType = messageType;
  103.   }

  104.   public void setBindingRawEnumValue(String value) {
  105.     this.binding = (ServiceBinding) ServiceBinding.toEnumConstantFromString(value);
  106.   }

  107.   public String getBindingRawEnumValue() {
  108.     if(this.binding == null){
  109.         return null;
  110.     }else{
  111.         return this.binding.toString();
  112.     }
  113.   }

  114.   public org.openspcoop2.protocol.manifest.constants.ServiceBinding getBinding() {
  115.     return this.binding;
  116.   }

  117.   public void setBinding(org.openspcoop2.protocol.manifest.constants.ServiceBinding binding) {
  118.     this.binding = binding;
  119.   }

  120.   private static final long serialVersionUID = 1L;



  121.   @XmlElement(name="soapMediaTypeCollection",required=false,nillable=false)
  122.   protected SoapMediaTypeCollection soapMediaTypeCollection;

  123.   @XmlElement(name="restMediaTypeCollection",required=false,nillable=false)
  124.   protected RestMediaTypeCollection restMediaTypeCollection;

  125.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  126.   @XmlAttribute(name="name",required=true)
  127.   protected java.lang.String name;

  128.   @javax.xml.bind.annotation.XmlSchemaType(name="string")
  129.   @XmlAttribute(name="protocol",required=false)
  130.   protected java.lang.String protocol;

  131.   @javax.xml.bind.annotation.XmlTransient
  132.   protected java.lang.String messageTypeRawEnumValue;

  133.   @XmlAttribute(name="messageType",required=false)
  134.   protected MessageType messageType;

  135.   @javax.xml.bind.annotation.XmlTransient
  136.   protected java.lang.String bindingRawEnumValue;

  137.   @XmlAttribute(name="binding",required=false)
  138.   protected ServiceBinding binding;

  139. }