blob: d780fc1e444bf5bcb94e2fd555747a2033400a21 [file] [log] [blame]
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -08001/*
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
18package org.onosproject.netconf.rpc;
19
20import java.io.Serializable;
21import java.util.ArrayList;
22import java.util.List;
23import javax.xml.bind.JAXBElement;
24import javax.xml.bind.annotation.XmlAccessType;
25import javax.xml.bind.annotation.XmlAccessorType;
26import javax.xml.bind.annotation.XmlAnyElement;
27import javax.xml.bind.annotation.XmlElement;
28import javax.xml.bind.annotation.XmlElementRef;
29import javax.xml.bind.annotation.XmlElementRefs;
30import javax.xml.bind.annotation.XmlSchemaType;
31import javax.xml.bind.annotation.XmlType;
32import javax.xml.namespace.QName;
33import 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 * &lt;complexType name="errorInfoType"&gt;
43 * &lt;complexContent&gt;
44 * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
45 * &lt;sequence&gt;
46 * &lt;choice&gt;
47 * &lt;element name="session-id" type="{urn:ietf:params:xml:ns:netconf:base:1.0}SessionIdOrZero"/&gt;
48 * &lt;sequence maxOccurs="unbounded" minOccurs="0"&gt;
49 * &lt;sequence&gt;
50 * &lt;element name="bad-attribute" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/&gt;
51 * &lt;element name="bad-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/&gt;
52 * &lt;element name="ok-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/&gt;
53 * &lt;element name="err-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/&gt;
54 * &lt;element name="noop-element" type="{http://www.w3.org/2001/XMLSchema}QName" minOccurs="0"/&gt;
55 * &lt;element name="bad-namespace" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
56 * &lt;/sequence&gt;
57 * &lt;/sequence&gt;
58 * &lt;/choice&gt;
59 * &lt;any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/&gt;
60 * &lt;/sequence&gt;
61 * &lt;/restriction&gt;
62 * &lt;/complexContent&gt;
63 * &lt;/complexType&gt;
64 * </pre>
65 *
66 *
67 */
68@XmlAccessorType(XmlAccessType.FIELD)
69@XmlType(name = "errorInfoType", propOrder = {
70 "sessionId",
71 "badAttributeAndBadElementAndOkElement",
72 "any"
73})
74public 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.
117 *
118 * <p>
119 * This accessor method returns a reference to the live list,
120 * not a snapshot. Therefore any modification you make to the
121 * returned list will be present inside the JAXB object.
122 * This is why there is not a <CODE>set</CODE> method for the badAttributeAndBadElementAndOkElement property.
123 *
124 * <p>
125 * For example, to add a new item, do as follows:
126 * <pre>
127 * getBadAttributeAndBadElementAndOkElement().add(newItem);
128 * </pre>
129 *
130 *
131 * <p>
132 * Objects of the following type(s) are allowed in the list
133 * {@link JAXBElement }{@code <}{@link QName }{@code >}
134 * {@link JAXBElement }{@code <}{@link QName }{@code >}
135 * {@link JAXBElement }{@code <}{@link QName }{@code >}
136 * {@link JAXBElement }{@code <}{@link QName }{@code >}
137 * {@link JAXBElement }{@code <}{@link QName }{@code >}
138 * {@link JAXBElement }{@code <}{@link String }{@code >}
139 *
140 *
141 */
142 public List<JAXBElement<? extends Serializable>> getBadAttributeAndBadElementAndOkElement() {
143 if (badAttributeAndBadElementAndOkElement == null) {
144 badAttributeAndBadElementAndOkElement = new ArrayList<JAXBElement<? extends Serializable>>();
145 }
146 return this.badAttributeAndBadElementAndOkElement;
147 }
148
149 /**
150 * Gets the value of the any property.
151 *
152 * <p>
153 * This accessor method returns a reference to the live list,
154 * not a snapshot. Therefore any modification you make to the
155 * returned list will be present inside the JAXB object.
156 * This is why there is not a <CODE>set</CODE> method for the any property.
157 *
158 * <p>
159 * For example, to add a new item, do as follows:
160 * <pre>
161 * getAny().add(newItem);
162 * </pre>
163 *
164 *
165 * <p>
166 * Objects of the following type(s) are allowed in the list
167 * {@link Element }
168 * {@link Object }
169 *
170 *
171 */
172 public List<Object> getAny() {
173 if (any == null) {
174 any = new ArrayList<Object>();
175 }
176 return this.any;
177 }
178
179}