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.util.ArrayList; |
| 21 | import java.util.List; |
| 22 | import javax.xml.bind.annotation.XmlAccessType; |
| 23 | import javax.xml.bind.annotation.XmlAccessorType; |
| 24 | import javax.xml.bind.annotation.XmlElement; |
| 25 | import javax.xml.bind.annotation.XmlRootElement; |
| 26 | import javax.xml.bind.annotation.XmlSchemaType; |
| 27 | import javax.xml.bind.annotation.XmlType; |
| 28 | |
| 29 | |
| 30 | /** |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame] | 31 | * Java class for anonymous complex type. |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 32 | * |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame] | 33 | * <p>The following schema fragment specifies the expected content contained within this class. |
| 34 | * </p> |
| 35 | * |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 36 | * <pre> |
| 37 | * <complexType> |
| 38 | * <complexContent> |
| 39 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 40 | * <sequence> |
| 41 | * <element name="capabilities"> |
| 42 | * <complexType> |
| 43 | * <complexContent> |
| 44 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 45 | * <sequence> |
| 46 | * <element name="capability" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/> |
| 47 | * </sequence> |
| 48 | * </restriction> |
| 49 | * </complexContent> |
| 50 | * </complexType> |
| 51 | * </element> |
| 52 | * <element name="session-id" type="{urn:ietf:params:xml:ns:netconf:base:1.0}SessionId" minOccurs="0"/> |
| 53 | * </sequence> |
| 54 | * </restriction> |
| 55 | * </complexContent> |
| 56 | * </complexType> |
| 57 | * </pre> |
| 58 | * |
| 59 | * |
| 60 | */ |
| 61 | @XmlAccessorType(XmlAccessType.FIELD) |
| 62 | @XmlType(name = "", propOrder = { |
| 63 | "capabilities", |
| 64 | "sessionId" |
| 65 | }) |
| 66 | @XmlRootElement(name = "hello") |
| 67 | public class Hello { |
| 68 | |
| 69 | @XmlElement(required = true) |
| 70 | protected Hello.Capabilities capabilities; |
| 71 | @XmlElement(name = "session-id") |
| 72 | @XmlSchemaType(name = "unsignedInt") |
| 73 | protected Long sessionId; |
| 74 | |
| 75 | /** |
| 76 | * Gets the value of the capabilities property. |
| 77 | * |
| 78 | * @return |
| 79 | * possible object is |
| 80 | * {@link Hello.Capabilities } |
| 81 | * |
| 82 | */ |
| 83 | public Hello.Capabilities getCapabilities() { |
| 84 | return capabilities; |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Sets the value of the capabilities property. |
| 89 | * |
| 90 | * @param value |
| 91 | * allowed object is |
| 92 | * {@link Hello.Capabilities } |
| 93 | * |
| 94 | */ |
| 95 | public void setCapabilities(Hello.Capabilities value) { |
| 96 | this.capabilities = value; |
| 97 | } |
| 98 | |
| 99 | /** |
| 100 | * Gets the value of the sessionId property. |
| 101 | * |
| 102 | * @return |
| 103 | * possible object is |
| 104 | * {@link Long } |
| 105 | * |
| 106 | */ |
| 107 | public Long getSessionId() { |
| 108 | return sessionId; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Sets the value of the sessionId property. |
| 113 | * |
| 114 | * @param value |
| 115 | * allowed object is |
| 116 | * {@link Long } |
| 117 | * |
| 118 | */ |
| 119 | public void setSessionId(Long value) { |
| 120 | this.sessionId = value; |
| 121 | } |
| 122 | |
| 123 | |
| 124 | /** |
| 125 | * <p>Java class for anonymous complex type. |
| 126 | * |
| 127 | * <p>The following schema fragment specifies the expected content contained within this class. |
| 128 | * |
| 129 | * <pre> |
| 130 | * <complexType> |
| 131 | * <complexContent> |
| 132 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 133 | * <sequence> |
| 134 | * <element name="capability" type="{http://www.w3.org/2001/XMLSchema}anyURI" maxOccurs="unbounded"/> |
| 135 | * </sequence> |
| 136 | * </restriction> |
| 137 | * </complexContent> |
| 138 | * </complexType> |
| 139 | * </pre> |
| 140 | * |
| 141 | * |
| 142 | */ |
| 143 | @XmlAccessorType(XmlAccessType.FIELD) |
| 144 | @XmlType(name = "", propOrder = { |
| 145 | "capability" |
| 146 | }) |
| 147 | public static class Capabilities { |
| 148 | |
| 149 | @XmlElement(required = true) |
| 150 | @XmlSchemaType(name = "anyURI") |
| 151 | protected List<String> capability; |
| 152 | |
| 153 | /** |
| 154 | * Gets the value of the capability property. |
| 155 | * |
| 156 | * <p> |
| 157 | * This accessor method returns a reference to the live list, |
| 158 | * not a snapshot. Therefore any modification you make to the |
| 159 | * returned list will be present inside the JAXB object. |
| 160 | * This is why there is not a <CODE>set</CODE> method for the capability property. |
| 161 | * |
| 162 | * <p> |
| 163 | * For example, to add a new item, do as follows: |
| 164 | * <pre> |
| 165 | * getCapability().add(newItem); |
| 166 | * </pre> |
| 167 | * |
| 168 | * |
| 169 | * <p> |
| 170 | * Objects of the following type(s) are allowed in the list |
| 171 | * {@link String } |
| 172 | * |
Thomas Vachuska | a01ef78 | 2018-07-25 14:07:11 -0700 | [diff] [blame] | 173 | * @return list of capabilities |
Yuta HIGUCHI | d1c413b | 2018-02-20 14:52:00 -0800 | [diff] [blame] | 174 | */ |
| 175 | public List<String> getCapability() { |
| 176 | if (capability == null) { |
| 177 | capability = new ArrayList<String>(); |
| 178 | } |
| 179 | return this.capability; |
| 180 | } |
| 181 | |
| 182 | } |
| 183 | |
| 184 | } |