blob: 7dde59f232a874a733f4db793043da5d9811457d [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.
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800117 * <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 Vachuskaa01ef782018-07-25 14:07:11 -0700121 * This is why there is not a <CODE>set</CODE> method for the
122 * badAttributeAndBadElementAndOkElement property.
123 * </p>
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800124 * For example, to add a new item, do as follows:
125 * <pre>
126 * getBadAttributeAndBadElementAndOkElement().add(newItem);
127 * </pre>
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800128 * <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 Vachuskaa01ef782018-07-25 14:07:11 -0700136 * </p>
137 * @return list of properties
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800138 */
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 HIGUCHId1c413b2018-02-20 14:52:00 -0800148 * <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 Vachuskaa01ef782018-07-25 14:07:11 -0700153 * </p>
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800154 * For example, to add a new item, do as follows:
155 * <pre>
156 * getAny().add(newItem);
157 * </pre>
Thomas Vachuskaa01ef782018-07-25 14:07:11 -0700158 *
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800159 * <p>
160 * Objects of the following type(s) are allowed in the list
161 * {@link Element }
162 * {@link Object }
Thomas Vachuskaa01ef782018-07-25 14:07:11 -0700163 * </p>
164 * @return list of properties
Yuta HIGUCHId1c413b2018-02-20 14:52:00 -0800165 */
166 public List<Object> getAny() {
167 if (any == null) {
168 any = new ArrayList<Object>();
169 }
170 return this.any;
171 }
172
173}