Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may not |
| 5 | * use this file except in compliance with the License. You may obtain a copy |
| 6 | * of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 13 | * License for the specific language governing permissions and limitations under |
| 14 | * the License. |
| 15 | */ |
| 16 | // CHECKSTYLE:OFF |
| 17 | |
| 18 | package org.onosproject.netconf.rpc; |
| 19 | |
| 20 | import java.io.Serializable; |
| 21 | import java.util.ArrayList; |
| 22 | import java.util.List; |
| 23 | import javax.xml.bind.JAXBElement; |
| 24 | import javax.xml.bind.annotation.XmlAccessType; |
| 25 | import javax.xml.bind.annotation.XmlAccessorType; |
| 26 | import javax.xml.bind.annotation.XmlAnyElement; |
| 27 | import javax.xml.bind.annotation.XmlElement; |
| 28 | import javax.xml.bind.annotation.XmlElementRef; |
| 29 | import javax.xml.bind.annotation.XmlElementRefs; |
| 30 | import javax.xml.bind.annotation.XmlSchemaType; |
| 31 | import javax.xml.bind.annotation.XmlType; |
| 32 | import javax.xml.namespace.QName; |
| 33 | import org.w3c.dom.Element; |
| 34 | |
| 35 | |
| 36 | /** |
| 37 | * <p>Java class for errorInfoType complex type. |
| 38 | * |
| 39 | * <p>The following schema fragment specifies the expected content contained within this class. |
| 40 | * |
| 41 | * <pre> |
| 42 | * <complexType name="errorInfoType"> |
| 43 | * <complexContent> |
| 44 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 45 | * <sequence> |
| 46 | * <choice> |
| 47 | * <element name="session-id" type="{urn:ietf:params:xml:ns:netconf:base:1.0}SessionIdOrZero"/> |
| 48 | * <sequence maxOccurs="unbounded" minOccurs="0"> |
| 49 | * <sequence> |
| 50 | * <element name="bad-attribute" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/> |
| 51 | * <element name="bad-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/> |
| 52 | * <element name="ok-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/> |
| 53 | * <element name="err-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/> |
| 54 | * <element name="noop-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/> |
| 55 | * <element name="bad-namespace" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/> |
| 56 | * </sequence> |
| 57 | * </sequence> |
| 58 | * </choice> |
| 59 | * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> |
| 60 | * </sequence> |
| 61 | * </restriction> |
| 62 | * </complexContent> |
| 63 | * </complexType> |
| 64 | * </pre> |
| 65 | * |
| 66 | * |
| 67 | */ |
| 68 | @XmlAccessorType(XmlAccessType.FIELD) |
| 69 | @XmlType(name = "errorInfoType", propOrder = { |
| 70 | "sessionId", |
| 71 | "badAttributeAndBadElementAndOkElement", |
| 72 | "any" |
| 73 | }) |
| 74 | public class ErrorInfoType { |
| 75 | |
| 76 | @XmlElement(name = "session-id") |
| 77 | @XmlSchemaType(name = "unsignedInt") |
| 78 | protected Long sessionId; |
| 79 | @XmlElementRefs({ |
| 80 | @XmlElementRef(name = "bad-attribute", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false), |
| 81 | @XmlElementRef(name = "bad-element", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false), |
| 82 | @XmlElementRef(name = "ok-element", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false), |
| 83 | @XmlElementRef(name = "err-element", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false), |
| 84 | @XmlElementRef(name = "noop-element", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false), |
| 85 | @XmlElementRef(name = "bad-namespace", namespace = "urn:ietf:params:xml:ns:netconf:base:1.0", type = JAXBElement.class, required = false) |
| 86 | }) |
| 87 | protected List<JAXBElement<? extends Serializable>> badAttributeAndBadElementAndOkElement; |
| 88 | @XmlAnyElement(lax = true) |
| 89 | protected List<Object> any; |
| 90 | |
| 91 | /** |
| 92 | * Gets the value of the sessionId property. |
| 93 | * |
| 94 | * @return |
| 95 | * possible object is |
| 96 | * {@link Long } |
| 97 | * |
| 98 | */ |
| 99 | public Long getSessionId() { |
| 100 | return sessionId; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Sets the value of the sessionId property. |
| 105 | * |
| 106 | * @param value |
| 107 | * allowed object is |
| 108 | * {@link Long } |
| 109 | * |
| 110 | */ |
| 111 | public void setSessionId(Long value) { |
| 112 | this.sessionId = value; |
| 113 | } |
| 114 | |
| 115 | /** |
| 116 | * Gets the value of the badAttributeAndBadElementAndOkElement property. |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 117 | * <p> |
| 118 | * This accessor method returns a reference to the live list, |
| 119 | * not a snapshot. Therefore any modification you make to the |
| 120 | * returned list will be present inside the JAXB object. |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame^] | 121 | * This is why there is not a <CODE>set</CODE> method for the |
| 122 | * badAttributeAndBadElementAndOkElement property. |
| 123 | * </p> |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 124 | * For example, to add a new item, do as follows: |
| 125 | * <pre> |
| 126 | * getBadAttributeAndBadElementAndOkElement().add(newItem); |
| 127 | * </pre> |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 128 | * <p> |
| 129 | * Objects of the following type(s) are allowed in the list |
| 130 | * {@link JAXBElement }{@code <}{@link QName }{@code >} |
| 131 | * {@link JAXBElement }{@code <}{@link QName }{@code >} |
| 132 | * {@link JAXBElement }{@code <}{@link QName }{@code >} |
| 133 | * {@link JAXBElement }{@code <}{@link QName }{@code >} |
| 134 | * {@link JAXBElement }{@code <}{@link QName }{@code >} |
| 135 | * {@link JAXBElement }{@code <}{@link String }{@code >} |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame^] | 136 | * </p> |
| 137 | * @return list of properties |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 138 | */ |
| 139 | public List<JAXBElement<? extends Serializable>> getBadAttributeAndBadElementAndOkElement() { |
| 140 | if (badAttributeAndBadElementAndOkElement == null) { |
| 141 | badAttributeAndBadElementAndOkElement = new ArrayList<JAXBElement<? extends Serializable>>(); |
| 142 | } |
| 143 | return this.badAttributeAndBadElementAndOkElement; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Gets the value of the any property. |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 148 | * <p> |
| 149 | * This accessor method returns a reference to the live list, |
| 150 | * not a snapshot. Therefore any modification you make to the |
| 151 | * returned list will be present inside the JAXB object. |
| 152 | * This is why there is not a <CODE>set</CODE> method for the any property. |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame^] | 153 | * </p> |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 154 | * For example, to add a new item, do as follows: |
| 155 | * <pre> |
| 156 | * getAny().add(newItem); |
| 157 | * </pre> |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame^] | 158 | * |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 159 | * <p> |
| 160 | * Objects of the following type(s) are allowed in the list |
| 161 | * {@link Element } |
| 162 | * {@link Object } |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame^] | 163 | * </p> |
| 164 | * @return list of properties |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 165 | */ |
| 166 | public List<Object> getAny() { |
| 167 | if (any == null) { |
| 168 | any = new ArrayList<Object>(); |
| 169 | } |
| 170 | return this.any; |
| 171 | } |
| 172 | |
| 173 | } |