TeruU | 28adcc3 | 2014-04-15 17:57:35 -0700 | [diff] [blame] | 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: device.proto |
| 3 | |
| 4 | package net.onrc.onos.core.datastore.serializers; |
| 5 | |
| 6 | public final class Device { |
| 7 | private Device() {} |
| 8 | public static void registerAllExtensions( |
| 9 | com.google.protobuf.ExtensionRegistry registry) { |
| 10 | } |
| 11 | public interface DevicePropertyOrBuilder |
| 12 | extends com.google.protobuf.MessageOrBuilder { |
| 13 | |
| 14 | // required bytes mac = 1; |
| 15 | /** |
| 16 | * <code>required bytes mac = 1;</code> |
| 17 | */ |
| 18 | boolean hasMac(); |
| 19 | /** |
| 20 | * <code>required bytes mac = 1;</code> |
| 21 | */ |
| 22 | com.google.protobuf.ByteString getMac(); |
| 23 | |
| 24 | // repeated bytes portIds = 2; |
| 25 | /** |
| 26 | * <code>repeated bytes portIds = 2;</code> |
| 27 | */ |
| 28 | java.util.List<com.google.protobuf.ByteString> getPortIdsList(); |
| 29 | /** |
| 30 | * <code>repeated bytes portIds = 2;</code> |
| 31 | */ |
| 32 | int getPortIdsCount(); |
| 33 | /** |
| 34 | * <code>repeated bytes portIds = 2;</code> |
| 35 | */ |
| 36 | com.google.protobuf.ByteString getPortIds(int index); |
| 37 | |
| 38 | // optional bytes value = 3; |
| 39 | /** |
| 40 | * <code>optional bytes value = 3;</code> |
| 41 | */ |
| 42 | boolean hasValue(); |
| 43 | /** |
| 44 | * <code>optional bytes value = 3;</code> |
| 45 | */ |
| 46 | com.google.protobuf.ByteString getValue(); |
| 47 | } |
| 48 | /** |
| 49 | * Protobuf type {@code device.DeviceProperty} |
| 50 | */ |
| 51 | public static final class DeviceProperty extends |
| 52 | com.google.protobuf.GeneratedMessage |
| 53 | implements DevicePropertyOrBuilder { |
| 54 | // Use DeviceProperty.newBuilder() to construct. |
| 55 | private DeviceProperty(com.google.protobuf.GeneratedMessage.Builder<?> builder) { |
| 56 | super(builder); |
| 57 | this.unknownFields = builder.getUnknownFields(); |
| 58 | } |
| 59 | private DeviceProperty(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } |
| 60 | |
| 61 | private static final DeviceProperty defaultInstance; |
| 62 | public static DeviceProperty getDefaultInstance() { |
| 63 | return defaultInstance; |
| 64 | } |
| 65 | |
| 66 | public DeviceProperty getDefaultInstanceForType() { |
| 67 | return defaultInstance; |
| 68 | } |
| 69 | |
| 70 | private final com.google.protobuf.UnknownFieldSet unknownFields; |
| 71 | @java.lang.Override |
| 72 | public final com.google.protobuf.UnknownFieldSet |
| 73 | getUnknownFields() { |
| 74 | return this.unknownFields; |
| 75 | } |
| 76 | private DeviceProperty( |
| 77 | com.google.protobuf.CodedInputStream input, |
| 78 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 79 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 80 | initFields(); |
| 81 | int mutable_bitField0_ = 0; |
| 82 | com.google.protobuf.UnknownFieldSet.Builder unknownFields = |
| 83 | com.google.protobuf.UnknownFieldSet.newBuilder(); |
| 84 | try { |
| 85 | boolean done = false; |
| 86 | while (!done) { |
| 87 | int tag = input.readTag(); |
| 88 | switch (tag) { |
| 89 | case 0: |
| 90 | done = true; |
| 91 | break; |
| 92 | default: { |
| 93 | if (!parseUnknownField(input, unknownFields, |
| 94 | extensionRegistry, tag)) { |
| 95 | done = true; |
| 96 | } |
| 97 | break; |
| 98 | } |
| 99 | case 10: { |
| 100 | bitField0_ |= 0x00000001; |
| 101 | mac_ = input.readBytes(); |
| 102 | break; |
| 103 | } |
| 104 | case 18: { |
| 105 | if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { |
| 106 | portIds_ = new java.util.ArrayList<com.google.protobuf.ByteString>(); |
| 107 | mutable_bitField0_ |= 0x00000002; |
| 108 | } |
| 109 | portIds_.add(input.readBytes()); |
| 110 | break; |
| 111 | } |
| 112 | case 26: { |
| 113 | bitField0_ |= 0x00000002; |
| 114 | value_ = input.readBytes(); |
| 115 | break; |
| 116 | } |
| 117 | } |
| 118 | } |
| 119 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
| 120 | throw e.setUnfinishedMessage(this); |
| 121 | } catch (java.io.IOException e) { |
| 122 | throw new com.google.protobuf.InvalidProtocolBufferException( |
| 123 | e.getMessage()).setUnfinishedMessage(this); |
| 124 | } finally { |
| 125 | if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { |
| 126 | portIds_ = java.util.Collections.unmodifiableList(portIds_); |
| 127 | } |
| 128 | this.unknownFields = unknownFields.build(); |
| 129 | makeExtensionsImmutable(); |
| 130 | } |
| 131 | } |
| 132 | public static final com.google.protobuf.Descriptors.Descriptor |
| 133 | getDescriptor() { |
| 134 | return net.onrc.onos.core.datastore.serializers.Device.internal_static_device_DeviceProperty_descriptor; |
| 135 | } |
| 136 | |
| 137 | protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| 138 | internalGetFieldAccessorTable() { |
| 139 | return net.onrc.onos.core.datastore.serializers.Device.internal_static_device_DeviceProperty_fieldAccessorTable |
| 140 | .ensureFieldAccessorsInitialized( |
| 141 | net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.class, net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.Builder.class); |
| 142 | } |
| 143 | |
| 144 | public static com.google.protobuf.Parser<DeviceProperty> PARSER = |
| 145 | new com.google.protobuf.AbstractParser<DeviceProperty>() { |
| 146 | public DeviceProperty parsePartialFrom( |
| 147 | com.google.protobuf.CodedInputStream input, |
| 148 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 149 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 150 | return new DeviceProperty(input, extensionRegistry); |
| 151 | } |
| 152 | }; |
| 153 | |
| 154 | @java.lang.Override |
| 155 | public com.google.protobuf.Parser<DeviceProperty> getParserForType() { |
| 156 | return PARSER; |
| 157 | } |
| 158 | |
| 159 | private int bitField0_; |
| 160 | // required bytes mac = 1; |
| 161 | public static final int MAC_FIELD_NUMBER = 1; |
| 162 | private com.google.protobuf.ByteString mac_; |
| 163 | /** |
| 164 | * <code>required bytes mac = 1;</code> |
| 165 | */ |
| 166 | public boolean hasMac() { |
| 167 | return ((bitField0_ & 0x00000001) == 0x00000001); |
| 168 | } |
| 169 | /** |
| 170 | * <code>required bytes mac = 1;</code> |
| 171 | */ |
| 172 | public com.google.protobuf.ByteString getMac() { |
| 173 | return mac_; |
| 174 | } |
| 175 | |
| 176 | // repeated bytes portIds = 2; |
| 177 | public static final int PORTIDS_FIELD_NUMBER = 2; |
| 178 | private java.util.List<com.google.protobuf.ByteString> portIds_; |
| 179 | /** |
| 180 | * <code>repeated bytes portIds = 2;</code> |
| 181 | */ |
| 182 | public java.util.List<com.google.protobuf.ByteString> |
| 183 | getPortIdsList() { |
| 184 | return portIds_; |
| 185 | } |
| 186 | /** |
| 187 | * <code>repeated bytes portIds = 2;</code> |
| 188 | */ |
| 189 | public int getPortIdsCount() { |
| 190 | return portIds_.size(); |
| 191 | } |
| 192 | /** |
| 193 | * <code>repeated bytes portIds = 2;</code> |
| 194 | */ |
| 195 | public com.google.protobuf.ByteString getPortIds(int index) { |
| 196 | return portIds_.get(index); |
| 197 | } |
| 198 | |
| 199 | // optional bytes value = 3; |
| 200 | public static final int VALUE_FIELD_NUMBER = 3; |
| 201 | private com.google.protobuf.ByteString value_; |
| 202 | /** |
| 203 | * <code>optional bytes value = 3;</code> |
| 204 | */ |
| 205 | public boolean hasValue() { |
| 206 | return ((bitField0_ & 0x00000002) == 0x00000002); |
| 207 | } |
| 208 | /** |
| 209 | * <code>optional bytes value = 3;</code> |
| 210 | */ |
| 211 | public com.google.protobuf.ByteString getValue() { |
| 212 | return value_; |
| 213 | } |
| 214 | |
| 215 | private void initFields() { |
| 216 | mac_ = com.google.protobuf.ByteString.EMPTY; |
| 217 | portIds_ = java.util.Collections.emptyList(); |
| 218 | value_ = com.google.protobuf.ByteString.EMPTY; |
| 219 | } |
| 220 | private byte memoizedIsInitialized = -1; |
| 221 | public final boolean isInitialized() { |
| 222 | byte isInitialized = memoizedIsInitialized; |
| 223 | if (isInitialized != -1) return isInitialized == 1; |
| 224 | |
| 225 | if (!hasMac()) { |
| 226 | memoizedIsInitialized = 0; |
| 227 | return false; |
| 228 | } |
| 229 | memoizedIsInitialized = 1; |
| 230 | return true; |
| 231 | } |
| 232 | |
| 233 | public void writeTo(com.google.protobuf.CodedOutputStream output) |
| 234 | throws java.io.IOException { |
| 235 | getSerializedSize(); |
| 236 | if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| 237 | output.writeBytes(1, mac_); |
| 238 | } |
| 239 | for (int i = 0; i < portIds_.size(); i++) { |
| 240 | output.writeBytes(2, portIds_.get(i)); |
| 241 | } |
| 242 | if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| 243 | output.writeBytes(3, value_); |
| 244 | } |
| 245 | getUnknownFields().writeTo(output); |
| 246 | } |
| 247 | |
| 248 | private int memoizedSerializedSize = -1; |
| 249 | public int getSerializedSize() { |
| 250 | int size = memoizedSerializedSize; |
| 251 | if (size != -1) return size; |
| 252 | |
| 253 | size = 0; |
| 254 | if (((bitField0_ & 0x00000001) == 0x00000001)) { |
| 255 | size += com.google.protobuf.CodedOutputStream |
| 256 | .computeBytesSize(1, mac_); |
| 257 | } |
| 258 | { |
| 259 | int dataSize = 0; |
| 260 | for (int i = 0; i < portIds_.size(); i++) { |
| 261 | dataSize += com.google.protobuf.CodedOutputStream |
| 262 | .computeBytesSizeNoTag(portIds_.get(i)); |
| 263 | } |
| 264 | size += dataSize; |
| 265 | size += 1 * getPortIdsList().size(); |
| 266 | } |
| 267 | if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| 268 | size += com.google.protobuf.CodedOutputStream |
| 269 | .computeBytesSize(3, value_); |
| 270 | } |
| 271 | size += getUnknownFields().getSerializedSize(); |
| 272 | memoizedSerializedSize = size; |
| 273 | return size; |
| 274 | } |
| 275 | |
| 276 | private static final long serialVersionUID = 0L; |
| 277 | @java.lang.Override |
| 278 | protected java.lang.Object writeReplace() |
| 279 | throws java.io.ObjectStreamException { |
| 280 | return super.writeReplace(); |
| 281 | } |
| 282 | |
| 283 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 284 | com.google.protobuf.ByteString data) |
| 285 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 286 | return PARSER.parseFrom(data); |
| 287 | } |
| 288 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 289 | com.google.protobuf.ByteString data, |
| 290 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 291 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 292 | return PARSER.parseFrom(data, extensionRegistry); |
| 293 | } |
| 294 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom(byte[] data) |
| 295 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 296 | return PARSER.parseFrom(data); |
| 297 | } |
| 298 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 299 | byte[] data, |
| 300 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 301 | throws com.google.protobuf.InvalidProtocolBufferException { |
| 302 | return PARSER.parseFrom(data, extensionRegistry); |
| 303 | } |
| 304 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom(java.io.InputStream input) |
| 305 | throws java.io.IOException { |
| 306 | return PARSER.parseFrom(input); |
| 307 | } |
| 308 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 309 | java.io.InputStream input, |
| 310 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 311 | throws java.io.IOException { |
| 312 | return PARSER.parseFrom(input, extensionRegistry); |
| 313 | } |
| 314 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseDelimitedFrom(java.io.InputStream input) |
| 315 | throws java.io.IOException { |
| 316 | return PARSER.parseDelimitedFrom(input); |
| 317 | } |
| 318 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseDelimitedFrom( |
| 319 | java.io.InputStream input, |
| 320 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 321 | throws java.io.IOException { |
| 322 | return PARSER.parseDelimitedFrom(input, extensionRegistry); |
| 323 | } |
| 324 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 325 | com.google.protobuf.CodedInputStream input) |
| 326 | throws java.io.IOException { |
| 327 | return PARSER.parseFrom(input); |
| 328 | } |
| 329 | public static net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parseFrom( |
| 330 | com.google.protobuf.CodedInputStream input, |
| 331 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 332 | throws java.io.IOException { |
| 333 | return PARSER.parseFrom(input, extensionRegistry); |
| 334 | } |
| 335 | |
| 336 | public static Builder newBuilder() { return Builder.create(); } |
| 337 | public Builder newBuilderForType() { return newBuilder(); } |
| 338 | public static Builder newBuilder(net.onrc.onos.core.datastore.serializers.Device.DeviceProperty prototype) { |
| 339 | return newBuilder().mergeFrom(prototype); |
| 340 | } |
| 341 | public Builder toBuilder() { return newBuilder(this); } |
| 342 | |
| 343 | @java.lang.Override |
| 344 | protected Builder newBuilderForType( |
| 345 | com.google.protobuf.GeneratedMessage.BuilderParent parent) { |
| 346 | Builder builder = new Builder(parent); |
| 347 | return builder; |
| 348 | } |
| 349 | /** |
| 350 | * Protobuf type {@code device.DeviceProperty} |
| 351 | */ |
| 352 | public static final class Builder extends |
| 353 | com.google.protobuf.GeneratedMessage.Builder<Builder> |
| 354 | implements net.onrc.onos.core.datastore.serializers.Device.DevicePropertyOrBuilder { |
| 355 | public static final com.google.protobuf.Descriptors.Descriptor |
| 356 | getDescriptor() { |
| 357 | return net.onrc.onos.core.datastore.serializers.Device.internal_static_device_DeviceProperty_descriptor; |
| 358 | } |
| 359 | |
| 360 | protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| 361 | internalGetFieldAccessorTable() { |
| 362 | return net.onrc.onos.core.datastore.serializers.Device.internal_static_device_DeviceProperty_fieldAccessorTable |
| 363 | .ensureFieldAccessorsInitialized( |
| 364 | net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.class, net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.Builder.class); |
| 365 | } |
| 366 | |
| 367 | // Construct using net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.newBuilder() |
| 368 | private Builder() { |
| 369 | maybeForceBuilderInitialization(); |
| 370 | } |
| 371 | |
| 372 | private Builder( |
| 373 | com.google.protobuf.GeneratedMessage.BuilderParent parent) { |
| 374 | super(parent); |
| 375 | maybeForceBuilderInitialization(); |
| 376 | } |
| 377 | private void maybeForceBuilderInitialization() { |
| 378 | if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { |
| 379 | } |
| 380 | } |
| 381 | private static Builder create() { |
| 382 | return new Builder(); |
| 383 | } |
| 384 | |
| 385 | public Builder clear() { |
| 386 | super.clear(); |
| 387 | mac_ = com.google.protobuf.ByteString.EMPTY; |
| 388 | bitField0_ = (bitField0_ & ~0x00000001); |
| 389 | portIds_ = java.util.Collections.emptyList(); |
| 390 | bitField0_ = (bitField0_ & ~0x00000002); |
| 391 | value_ = com.google.protobuf.ByteString.EMPTY; |
| 392 | bitField0_ = (bitField0_ & ~0x00000004); |
| 393 | return this; |
| 394 | } |
| 395 | |
| 396 | public Builder clone() { |
| 397 | return create().mergeFrom(buildPartial()); |
| 398 | } |
| 399 | |
| 400 | public com.google.protobuf.Descriptors.Descriptor |
| 401 | getDescriptorForType() { |
| 402 | return net.onrc.onos.core.datastore.serializers.Device.internal_static_device_DeviceProperty_descriptor; |
| 403 | } |
| 404 | |
| 405 | public net.onrc.onos.core.datastore.serializers.Device.DeviceProperty getDefaultInstanceForType() { |
| 406 | return net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.getDefaultInstance(); |
| 407 | } |
| 408 | |
| 409 | public net.onrc.onos.core.datastore.serializers.Device.DeviceProperty build() { |
| 410 | net.onrc.onos.core.datastore.serializers.Device.DeviceProperty result = buildPartial(); |
| 411 | if (!result.isInitialized()) { |
| 412 | throw newUninitializedMessageException(result); |
| 413 | } |
| 414 | return result; |
| 415 | } |
| 416 | |
| 417 | public net.onrc.onos.core.datastore.serializers.Device.DeviceProperty buildPartial() { |
| 418 | net.onrc.onos.core.datastore.serializers.Device.DeviceProperty result = new net.onrc.onos.core.datastore.serializers.Device.DeviceProperty(this); |
| 419 | int from_bitField0_ = bitField0_; |
| 420 | int to_bitField0_ = 0; |
| 421 | if (((from_bitField0_ & 0x00000001) == 0x00000001)) { |
| 422 | to_bitField0_ |= 0x00000001; |
| 423 | } |
| 424 | result.mac_ = mac_; |
| 425 | if (((bitField0_ & 0x00000002) == 0x00000002)) { |
| 426 | portIds_ = java.util.Collections.unmodifiableList(portIds_); |
| 427 | bitField0_ = (bitField0_ & ~0x00000002); |
| 428 | } |
| 429 | result.portIds_ = portIds_; |
| 430 | if (((from_bitField0_ & 0x00000004) == 0x00000004)) { |
| 431 | to_bitField0_ |= 0x00000002; |
| 432 | } |
| 433 | result.value_ = value_; |
| 434 | result.bitField0_ = to_bitField0_; |
| 435 | onBuilt(); |
| 436 | return result; |
| 437 | } |
| 438 | |
| 439 | public Builder mergeFrom(com.google.protobuf.Message other) { |
| 440 | if (other instanceof net.onrc.onos.core.datastore.serializers.Device.DeviceProperty) { |
| 441 | return mergeFrom((net.onrc.onos.core.datastore.serializers.Device.DeviceProperty)other); |
| 442 | } else { |
| 443 | super.mergeFrom(other); |
| 444 | return this; |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | public Builder mergeFrom(net.onrc.onos.core.datastore.serializers.Device.DeviceProperty other) { |
| 449 | if (other == net.onrc.onos.core.datastore.serializers.Device.DeviceProperty.getDefaultInstance()) return this; |
| 450 | if (other.hasMac()) { |
| 451 | setMac(other.getMac()); |
| 452 | } |
| 453 | if (!other.portIds_.isEmpty()) { |
| 454 | if (portIds_.isEmpty()) { |
| 455 | portIds_ = other.portIds_; |
| 456 | bitField0_ = (bitField0_ & ~0x00000002); |
| 457 | } else { |
| 458 | ensurePortIdsIsMutable(); |
| 459 | portIds_.addAll(other.portIds_); |
| 460 | } |
| 461 | onChanged(); |
| 462 | } |
| 463 | if (other.hasValue()) { |
| 464 | setValue(other.getValue()); |
| 465 | } |
| 466 | this.mergeUnknownFields(other.getUnknownFields()); |
| 467 | return this; |
| 468 | } |
| 469 | |
| 470 | public final boolean isInitialized() { |
| 471 | if (!hasMac()) { |
| 472 | |
| 473 | return false; |
| 474 | } |
| 475 | return true; |
| 476 | } |
| 477 | |
| 478 | public Builder mergeFrom( |
| 479 | com.google.protobuf.CodedInputStream input, |
| 480 | com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
| 481 | throws java.io.IOException { |
| 482 | net.onrc.onos.core.datastore.serializers.Device.DeviceProperty parsedMessage = null; |
| 483 | try { |
| 484 | parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); |
| 485 | } catch (com.google.protobuf.InvalidProtocolBufferException e) { |
| 486 | parsedMessage = (net.onrc.onos.core.datastore.serializers.Device.DeviceProperty) e.getUnfinishedMessage(); |
| 487 | throw e; |
| 488 | } finally { |
| 489 | if (parsedMessage != null) { |
| 490 | mergeFrom(parsedMessage); |
| 491 | } |
| 492 | } |
| 493 | return this; |
| 494 | } |
| 495 | private int bitField0_; |
| 496 | |
| 497 | // required bytes mac = 1; |
| 498 | private com.google.protobuf.ByteString mac_ = com.google.protobuf.ByteString.EMPTY; |
| 499 | /** |
| 500 | * <code>required bytes mac = 1;</code> |
| 501 | */ |
| 502 | public boolean hasMac() { |
| 503 | return ((bitField0_ & 0x00000001) == 0x00000001); |
| 504 | } |
| 505 | /** |
| 506 | * <code>required bytes mac = 1;</code> |
| 507 | */ |
| 508 | public com.google.protobuf.ByteString getMac() { |
| 509 | return mac_; |
| 510 | } |
| 511 | /** |
| 512 | * <code>required bytes mac = 1;</code> |
| 513 | */ |
| 514 | public Builder setMac(com.google.protobuf.ByteString value) { |
| 515 | if (value == null) { |
| 516 | throw new NullPointerException(); |
| 517 | } |
| 518 | bitField0_ |= 0x00000001; |
| 519 | mac_ = value; |
| 520 | onChanged(); |
| 521 | return this; |
| 522 | } |
| 523 | /** |
| 524 | * <code>required bytes mac = 1;</code> |
| 525 | */ |
| 526 | public Builder clearMac() { |
| 527 | bitField0_ = (bitField0_ & ~0x00000001); |
| 528 | mac_ = getDefaultInstance().getMac(); |
| 529 | onChanged(); |
| 530 | return this; |
| 531 | } |
| 532 | |
| 533 | // repeated bytes portIds = 2; |
| 534 | private java.util.List<com.google.protobuf.ByteString> portIds_ = java.util.Collections.emptyList(); |
| 535 | private void ensurePortIdsIsMutable() { |
| 536 | if (!((bitField0_ & 0x00000002) == 0x00000002)) { |
| 537 | portIds_ = new java.util.ArrayList<com.google.protobuf.ByteString>(portIds_); |
| 538 | bitField0_ |= 0x00000002; |
| 539 | } |
| 540 | } |
| 541 | /** |
| 542 | * <code>repeated bytes portIds = 2;</code> |
| 543 | */ |
| 544 | public java.util.List<com.google.protobuf.ByteString> |
| 545 | getPortIdsList() { |
| 546 | return java.util.Collections.unmodifiableList(portIds_); |
| 547 | } |
| 548 | /** |
| 549 | * <code>repeated bytes portIds = 2;</code> |
| 550 | */ |
| 551 | public int getPortIdsCount() { |
| 552 | return portIds_.size(); |
| 553 | } |
| 554 | /** |
| 555 | * <code>repeated bytes portIds = 2;</code> |
| 556 | */ |
| 557 | public com.google.protobuf.ByteString getPortIds(int index) { |
| 558 | return portIds_.get(index); |
| 559 | } |
| 560 | /** |
| 561 | * <code>repeated bytes portIds = 2;</code> |
| 562 | */ |
| 563 | public Builder setPortIds( |
| 564 | int index, com.google.protobuf.ByteString value) { |
| 565 | if (value == null) { |
| 566 | throw new NullPointerException(); |
| 567 | } |
| 568 | ensurePortIdsIsMutable(); |
| 569 | portIds_.set(index, value); |
| 570 | onChanged(); |
| 571 | return this; |
| 572 | } |
| 573 | /** |
| 574 | * <code>repeated bytes portIds = 2;</code> |
| 575 | */ |
| 576 | public Builder addPortIds(com.google.protobuf.ByteString value) { |
| 577 | if (value == null) { |
| 578 | throw new NullPointerException(); |
| 579 | } |
| 580 | ensurePortIdsIsMutable(); |
| 581 | portIds_.add(value); |
| 582 | onChanged(); |
| 583 | return this; |
| 584 | } |
| 585 | /** |
| 586 | * <code>repeated bytes portIds = 2;</code> |
| 587 | */ |
| 588 | public Builder addAllPortIds( |
| 589 | java.lang.Iterable<? extends com.google.protobuf.ByteString> values) { |
| 590 | ensurePortIdsIsMutable(); |
Ray Milkey | ff73514 | 2014-05-22 19:06:02 -0700 | [diff] [blame] | 591 | Builder.addAll(values, portIds_); |
TeruU | 28adcc3 | 2014-04-15 17:57:35 -0700 | [diff] [blame] | 592 | onChanged(); |
| 593 | return this; |
| 594 | } |
| 595 | /** |
| 596 | * <code>repeated bytes portIds = 2;</code> |
| 597 | */ |
| 598 | public Builder clearPortIds() { |
| 599 | portIds_ = java.util.Collections.emptyList(); |
| 600 | bitField0_ = (bitField0_ & ~0x00000002); |
| 601 | onChanged(); |
| 602 | return this; |
| 603 | } |
| 604 | |
| 605 | // optional bytes value = 3; |
| 606 | private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY; |
| 607 | /** |
| 608 | * <code>optional bytes value = 3;</code> |
| 609 | */ |
| 610 | public boolean hasValue() { |
| 611 | return ((bitField0_ & 0x00000004) == 0x00000004); |
| 612 | } |
| 613 | /** |
| 614 | * <code>optional bytes value = 3;</code> |
| 615 | */ |
| 616 | public com.google.protobuf.ByteString getValue() { |
| 617 | return value_; |
| 618 | } |
| 619 | /** |
| 620 | * <code>optional bytes value = 3;</code> |
| 621 | */ |
| 622 | public Builder setValue(com.google.protobuf.ByteString value) { |
| 623 | if (value == null) { |
| 624 | throw new NullPointerException(); |
| 625 | } |
| 626 | bitField0_ |= 0x00000004; |
| 627 | value_ = value; |
| 628 | onChanged(); |
| 629 | return this; |
| 630 | } |
| 631 | /** |
| 632 | * <code>optional bytes value = 3;</code> |
| 633 | */ |
| 634 | public Builder clearValue() { |
| 635 | bitField0_ = (bitField0_ & ~0x00000004); |
| 636 | value_ = getDefaultInstance().getValue(); |
| 637 | onChanged(); |
| 638 | return this; |
| 639 | } |
| 640 | |
| 641 | // @@protoc_insertion_point(builder_scope:device.DeviceProperty) |
| 642 | } |
| 643 | |
| 644 | static { |
| 645 | defaultInstance = new DeviceProperty(true); |
| 646 | defaultInstance.initFields(); |
| 647 | } |
| 648 | |
| 649 | // @@protoc_insertion_point(class_scope:device.DeviceProperty) |
| 650 | } |
| 651 | |
| 652 | private static com.google.protobuf.Descriptors.Descriptor |
| 653 | internal_static_device_DeviceProperty_descriptor; |
| 654 | private static |
| 655 | com.google.protobuf.GeneratedMessage.FieldAccessorTable |
| 656 | internal_static_device_DeviceProperty_fieldAccessorTable; |
| 657 | |
| 658 | public static com.google.protobuf.Descriptors.FileDescriptor |
| 659 | getDescriptor() { |
| 660 | return descriptor; |
| 661 | } |
| 662 | private static com.google.protobuf.Descriptors.FileDescriptor |
| 663 | descriptor; |
| 664 | static { |
| 665 | java.lang.String[] descriptorData = { |
| 666 | "\n\014device.proto\022\006device\"=\n\016DeviceProperty" + |
| 667 | "\022\013\n\003mac\030\001 \002(\014\022\017\n\007portIds\030\002 \003(\014\022\r\n\005value\030" + |
| 668 | "\003 \001(\014B2\n(net.onrc.onos.core.datastore.se" + |
| 669 | "rializersB\006Device" |
| 670 | }; |
| 671 | com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = |
| 672 | new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { |
| 673 | public com.google.protobuf.ExtensionRegistry assignDescriptors( |
| 674 | com.google.protobuf.Descriptors.FileDescriptor root) { |
| 675 | descriptor = root; |
| 676 | internal_static_device_DeviceProperty_descriptor = |
| 677 | getDescriptor().getMessageTypes().get(0); |
| 678 | internal_static_device_DeviceProperty_fieldAccessorTable = new |
| 679 | com.google.protobuf.GeneratedMessage.FieldAccessorTable( |
| 680 | internal_static_device_DeviceProperty_descriptor, |
| 681 | new java.lang.String[] { "Mac", "PortIds", "Value", }); |
| 682 | return null; |
| 683 | } |
| 684 | }; |
| 685 | com.google.protobuf.Descriptors.FileDescriptor |
| 686 | .internalBuildGeneratedFileFrom(descriptorData, |
| 687 | new com.google.protobuf.Descriptors.FileDescriptor[] { |
| 688 | }, assigner); |
| 689 | } |
| 690 | |
| 691 | // @@protoc_insertion_point(outer_class_scope) |
| 692 | } |