001/** 002 * Autogenerated by Avro 003 * 004 * DO NOT EDIT DIRECTLY 005 */ 006package org.apache.reef.tang.implementation.avro; 007@SuppressWarnings("all") 008@org.apache.avro.specific.AvroGenerated 009public class AvroNamedParameterNode extends org.apache.avro.specific.SpecificRecordBase implements org.apache.avro.specific.SpecificRecord { 010 public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"record\",\"name\":\"AvroNamedParameterNode\",\"namespace\":\"org.apache.reef.tang.implementation.avro\",\"fields\":[{\"name\":\"simpleArgClassName\",\"type\":\"string\"},{\"name\":\"fullArgClassName\",\"type\":\"string\"},{\"name\":\"isSet\",\"type\":\"boolean\"},{\"name\":\"isList\",\"type\":\"boolean\"},{\"name\":\"documentation\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"shortName\",\"type\":[\"null\",\"string\"],\"default\":null},{\"name\":\"instanceDefault\",\"type\":{\"type\":\"array\",\"items\":\"string\"}}]}"); 011 public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; } 012 @Deprecated public java.lang.CharSequence simpleArgClassName; 013 @Deprecated public java.lang.CharSequence fullArgClassName; 014 @Deprecated public boolean isSet; 015 @Deprecated public boolean isList; 016 @Deprecated public java.lang.CharSequence documentation; 017 @Deprecated public java.lang.CharSequence shortName; 018 @Deprecated public java.util.List<java.lang.CharSequence> instanceDefault; 019 020 /** 021 * Default constructor. Note that this does not initialize fields 022 * to their default values from the schema. If that is desired then 023 * one should use <code>newBuilder()</code>. 024 */ 025 public AvroNamedParameterNode() {} 026 027 /** 028 * All-args constructor. 029 */ 030 public AvroNamedParameterNode(java.lang.CharSequence simpleArgClassName, java.lang.CharSequence fullArgClassName, java.lang.Boolean isSet, java.lang.Boolean isList, java.lang.CharSequence documentation, java.lang.CharSequence shortName, java.util.List<java.lang.CharSequence> instanceDefault) { 031 this.simpleArgClassName = simpleArgClassName; 032 this.fullArgClassName = fullArgClassName; 033 this.isSet = isSet; 034 this.isList = isList; 035 this.documentation = documentation; 036 this.shortName = shortName; 037 this.instanceDefault = instanceDefault; 038 } 039 040 public org.apache.avro.Schema getSchema() { return SCHEMA$; } 041 // Used by DatumWriter. Applications should not call. 042 public java.lang.Object get(int field$) { 043 switch (field$) { 044 case 0: return simpleArgClassName; 045 case 1: return fullArgClassName; 046 case 2: return isSet; 047 case 3: return isList; 048 case 4: return documentation; 049 case 5: return shortName; 050 case 6: return instanceDefault; 051 default: throw new org.apache.avro.AvroRuntimeException("Bad index"); 052 } 053 } 054 // Used by DatumReader. Applications should not call. 055 @SuppressWarnings(value="unchecked") 056 public void put(int field$, java.lang.Object value$) { 057 switch (field$) { 058 case 0: simpleArgClassName = (java.lang.CharSequence)value$; break; 059 case 1: fullArgClassName = (java.lang.CharSequence)value$; break; 060 case 2: isSet = (java.lang.Boolean)value$; break; 061 case 3: isList = (java.lang.Boolean)value$; break; 062 case 4: documentation = (java.lang.CharSequence)value$; break; 063 case 5: shortName = (java.lang.CharSequence)value$; break; 064 case 6: instanceDefault = (java.util.List<java.lang.CharSequence>)value$; break; 065 default: throw new org.apache.avro.AvroRuntimeException("Bad index"); 066 } 067 } 068 069 /** 070 * Gets the value of the 'simpleArgClassName' field. 071 */ 072 public java.lang.CharSequence getSimpleArgClassName() { 073 return simpleArgClassName; 074 } 075 076 /** 077 * Sets the value of the 'simpleArgClassName' field. 078 * @param value the value to set. 079 */ 080 public void setSimpleArgClassName(java.lang.CharSequence value) { 081 this.simpleArgClassName = value; 082 } 083 084 /** 085 * Gets the value of the 'fullArgClassName' field. 086 */ 087 public java.lang.CharSequence getFullArgClassName() { 088 return fullArgClassName; 089 } 090 091 /** 092 * Sets the value of the 'fullArgClassName' field. 093 * @param value the value to set. 094 */ 095 public void setFullArgClassName(java.lang.CharSequence value) { 096 this.fullArgClassName = value; 097 } 098 099 /** 100 * Gets the value of the 'isSet' field. 101 */ 102 public java.lang.Boolean getIsSet() { 103 return isSet; 104 } 105 106 /** 107 * Sets the value of the 'isSet' field. 108 * @param value the value to set. 109 */ 110 public void setIsSet(java.lang.Boolean value) { 111 this.isSet = value; 112 } 113 114 /** 115 * Gets the value of the 'isList' field. 116 */ 117 public java.lang.Boolean getIsList() { 118 return isList; 119 } 120 121 /** 122 * Sets the value of the 'isList' field. 123 * @param value the value to set. 124 */ 125 public void setIsList(java.lang.Boolean value) { 126 this.isList = value; 127 } 128 129 /** 130 * Gets the value of the 'documentation' field. 131 */ 132 public java.lang.CharSequence getDocumentation() { 133 return documentation; 134 } 135 136 /** 137 * Sets the value of the 'documentation' field. 138 * @param value the value to set. 139 */ 140 public void setDocumentation(java.lang.CharSequence value) { 141 this.documentation = value; 142 } 143 144 /** 145 * Gets the value of the 'shortName' field. 146 */ 147 public java.lang.CharSequence getShortName() { 148 return shortName; 149 } 150 151 /** 152 * Sets the value of the 'shortName' field. 153 * @param value the value to set. 154 */ 155 public void setShortName(java.lang.CharSequence value) { 156 this.shortName = value; 157 } 158 159 /** 160 * Gets the value of the 'instanceDefault' field. 161 */ 162 public java.util.List<java.lang.CharSequence> getInstanceDefault() { 163 return instanceDefault; 164 } 165 166 /** 167 * Sets the value of the 'instanceDefault' field. 168 * @param value the value to set. 169 */ 170 public void setInstanceDefault(java.util.List<java.lang.CharSequence> value) { 171 this.instanceDefault = value; 172 } 173 174 /** Creates a new AvroNamedParameterNode RecordBuilder */ 175 public static org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder newBuilder() { 176 return new org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder(); 177 } 178 179 /** Creates a new AvroNamedParameterNode RecordBuilder by copying an existing Builder */ 180 public static org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder newBuilder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder other) { 181 return new org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder(other); 182 } 183 184 /** Creates a new AvroNamedParameterNode RecordBuilder by copying an existing AvroNamedParameterNode instance */ 185 public static org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder newBuilder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode other) { 186 return new org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder(other); 187 } 188 189 /** 190 * RecordBuilder for AvroNamedParameterNode instances. 191 */ 192 public static class Builder extends org.apache.avro.specific.SpecificRecordBuilderBase<AvroNamedParameterNode> 193 implements org.apache.avro.data.RecordBuilder<AvroNamedParameterNode> { 194 195 private java.lang.CharSequence simpleArgClassName; 196 private java.lang.CharSequence fullArgClassName; 197 private boolean isSet; 198 private boolean isList; 199 private java.lang.CharSequence documentation; 200 private java.lang.CharSequence shortName; 201 private java.util.List<java.lang.CharSequence> instanceDefault; 202 203 /** Creates a new Builder */ 204 private Builder() { 205 super(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.SCHEMA$); 206 } 207 208 /** Creates a Builder by copying an existing Builder */ 209 private Builder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder other) { 210 super(other); 211 if (isValidValue(fields()[0], other.simpleArgClassName)) { 212 this.simpleArgClassName = data().deepCopy(fields()[0].schema(), other.simpleArgClassName); 213 fieldSetFlags()[0] = true; 214 } 215 if (isValidValue(fields()[1], other.fullArgClassName)) { 216 this.fullArgClassName = data().deepCopy(fields()[1].schema(), other.fullArgClassName); 217 fieldSetFlags()[1] = true; 218 } 219 if (isValidValue(fields()[2], other.isSet)) { 220 this.isSet = data().deepCopy(fields()[2].schema(), other.isSet); 221 fieldSetFlags()[2] = true; 222 } 223 if (isValidValue(fields()[3], other.isList)) { 224 this.isList = data().deepCopy(fields()[3].schema(), other.isList); 225 fieldSetFlags()[3] = true; 226 } 227 if (isValidValue(fields()[4], other.documentation)) { 228 this.documentation = data().deepCopy(fields()[4].schema(), other.documentation); 229 fieldSetFlags()[4] = true; 230 } 231 if (isValidValue(fields()[5], other.shortName)) { 232 this.shortName = data().deepCopy(fields()[5].schema(), other.shortName); 233 fieldSetFlags()[5] = true; 234 } 235 if (isValidValue(fields()[6], other.instanceDefault)) { 236 this.instanceDefault = data().deepCopy(fields()[6].schema(), other.instanceDefault); 237 fieldSetFlags()[6] = true; 238 } 239 } 240 241 /** Creates a Builder by copying an existing AvroNamedParameterNode instance */ 242 private Builder(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode other) { 243 super(org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.SCHEMA$); 244 if (isValidValue(fields()[0], other.simpleArgClassName)) { 245 this.simpleArgClassName = data().deepCopy(fields()[0].schema(), other.simpleArgClassName); 246 fieldSetFlags()[0] = true; 247 } 248 if (isValidValue(fields()[1], other.fullArgClassName)) { 249 this.fullArgClassName = data().deepCopy(fields()[1].schema(), other.fullArgClassName); 250 fieldSetFlags()[1] = true; 251 } 252 if (isValidValue(fields()[2], other.isSet)) { 253 this.isSet = data().deepCopy(fields()[2].schema(), other.isSet); 254 fieldSetFlags()[2] = true; 255 } 256 if (isValidValue(fields()[3], other.isList)) { 257 this.isList = data().deepCopy(fields()[3].schema(), other.isList); 258 fieldSetFlags()[3] = true; 259 } 260 if (isValidValue(fields()[4], other.documentation)) { 261 this.documentation = data().deepCopy(fields()[4].schema(), other.documentation); 262 fieldSetFlags()[4] = true; 263 } 264 if (isValidValue(fields()[5], other.shortName)) { 265 this.shortName = data().deepCopy(fields()[5].schema(), other.shortName); 266 fieldSetFlags()[5] = true; 267 } 268 if (isValidValue(fields()[6], other.instanceDefault)) { 269 this.instanceDefault = data().deepCopy(fields()[6].schema(), other.instanceDefault); 270 fieldSetFlags()[6] = true; 271 } 272 } 273 274 /** Gets the value of the 'simpleArgClassName' field */ 275 public java.lang.CharSequence getSimpleArgClassName() { 276 return simpleArgClassName; 277 } 278 279 /** Sets the value of the 'simpleArgClassName' field */ 280 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setSimpleArgClassName(java.lang.CharSequence value) { 281 validate(fields()[0], value); 282 this.simpleArgClassName = value; 283 fieldSetFlags()[0] = true; 284 return this; 285 } 286 287 /** Checks whether the 'simpleArgClassName' field has been set */ 288 public boolean hasSimpleArgClassName() { 289 return fieldSetFlags()[0]; 290 } 291 292 /** Clears the value of the 'simpleArgClassName' field */ 293 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearSimpleArgClassName() { 294 simpleArgClassName = null; 295 fieldSetFlags()[0] = false; 296 return this; 297 } 298 299 /** Gets the value of the 'fullArgClassName' field */ 300 public java.lang.CharSequence getFullArgClassName() { 301 return fullArgClassName; 302 } 303 304 /** Sets the value of the 'fullArgClassName' field */ 305 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setFullArgClassName(java.lang.CharSequence value) { 306 validate(fields()[1], value); 307 this.fullArgClassName = value; 308 fieldSetFlags()[1] = true; 309 return this; 310 } 311 312 /** Checks whether the 'fullArgClassName' field has been set */ 313 public boolean hasFullArgClassName() { 314 return fieldSetFlags()[1]; 315 } 316 317 /** Clears the value of the 'fullArgClassName' field */ 318 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearFullArgClassName() { 319 fullArgClassName = null; 320 fieldSetFlags()[1] = false; 321 return this; 322 } 323 324 /** Gets the value of the 'isSet' field */ 325 public java.lang.Boolean getIsSet() { 326 return isSet; 327 } 328 329 /** Sets the value of the 'isSet' field */ 330 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setIsSet(boolean value) { 331 validate(fields()[2], value); 332 this.isSet = value; 333 fieldSetFlags()[2] = true; 334 return this; 335 } 336 337 /** Checks whether the 'isSet' field has been set */ 338 public boolean hasIsSet() { 339 return fieldSetFlags()[2]; 340 } 341 342 /** Clears the value of the 'isSet' field */ 343 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearIsSet() { 344 fieldSetFlags()[2] = false; 345 return this; 346 } 347 348 /** Gets the value of the 'isList' field */ 349 public java.lang.Boolean getIsList() { 350 return isList; 351 } 352 353 /** Sets the value of the 'isList' field */ 354 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setIsList(boolean value) { 355 validate(fields()[3], value); 356 this.isList = value; 357 fieldSetFlags()[3] = true; 358 return this; 359 } 360 361 /** Checks whether the 'isList' field has been set */ 362 public boolean hasIsList() { 363 return fieldSetFlags()[3]; 364 } 365 366 /** Clears the value of the 'isList' field */ 367 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearIsList() { 368 fieldSetFlags()[3] = false; 369 return this; 370 } 371 372 /** Gets the value of the 'documentation' field */ 373 public java.lang.CharSequence getDocumentation() { 374 return documentation; 375 } 376 377 /** Sets the value of the 'documentation' field */ 378 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setDocumentation(java.lang.CharSequence value) { 379 validate(fields()[4], value); 380 this.documentation = value; 381 fieldSetFlags()[4] = true; 382 return this; 383 } 384 385 /** Checks whether the 'documentation' field has been set */ 386 public boolean hasDocumentation() { 387 return fieldSetFlags()[4]; 388 } 389 390 /** Clears the value of the 'documentation' field */ 391 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearDocumentation() { 392 documentation = null; 393 fieldSetFlags()[4] = false; 394 return this; 395 } 396 397 /** Gets the value of the 'shortName' field */ 398 public java.lang.CharSequence getShortName() { 399 return shortName; 400 } 401 402 /** Sets the value of the 'shortName' field */ 403 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setShortName(java.lang.CharSequence value) { 404 validate(fields()[5], value); 405 this.shortName = value; 406 fieldSetFlags()[5] = true; 407 return this; 408 } 409 410 /** Checks whether the 'shortName' field has been set */ 411 public boolean hasShortName() { 412 return fieldSetFlags()[5]; 413 } 414 415 /** Clears the value of the 'shortName' field */ 416 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearShortName() { 417 shortName = null; 418 fieldSetFlags()[5] = false; 419 return this; 420 } 421 422 /** Gets the value of the 'instanceDefault' field */ 423 public java.util.List<java.lang.CharSequence> getInstanceDefault() { 424 return instanceDefault; 425 } 426 427 /** Sets the value of the 'instanceDefault' field */ 428 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder setInstanceDefault(java.util.List<java.lang.CharSequence> value) { 429 validate(fields()[6], value); 430 this.instanceDefault = value; 431 fieldSetFlags()[6] = true; 432 return this; 433 } 434 435 /** Checks whether the 'instanceDefault' field has been set */ 436 public boolean hasInstanceDefault() { 437 return fieldSetFlags()[6]; 438 } 439 440 /** Clears the value of the 'instanceDefault' field */ 441 public org.apache.reef.tang.implementation.avro.AvroNamedParameterNode.Builder clearInstanceDefault() { 442 instanceDefault = null; 443 fieldSetFlags()[6] = false; 444 return this; 445 } 446 447 @Override 448 public AvroNamedParameterNode build() { 449 try { 450 AvroNamedParameterNode record = new AvroNamedParameterNode(); 451 record.simpleArgClassName = fieldSetFlags()[0] ? this.simpleArgClassName : (java.lang.CharSequence) defaultValue(fields()[0]); 452 record.fullArgClassName = fieldSetFlags()[1] ? this.fullArgClassName : (java.lang.CharSequence) defaultValue(fields()[1]); 453 record.isSet = fieldSetFlags()[2] ? this.isSet : (java.lang.Boolean) defaultValue(fields()[2]); 454 record.isList = fieldSetFlags()[3] ? this.isList : (java.lang.Boolean) defaultValue(fields()[3]); 455 record.documentation = fieldSetFlags()[4] ? this.documentation : (java.lang.CharSequence) defaultValue(fields()[4]); 456 record.shortName = fieldSetFlags()[5] ? this.shortName : (java.lang.CharSequence) defaultValue(fields()[5]); 457 record.instanceDefault = fieldSetFlags()[6] ? this.instanceDefault : (java.util.List<java.lang.CharSequence>) defaultValue(fields()[6]); 458 return record; 459 } catch (Exception e) { 460 throw new org.apache.avro.AvroRuntimeException(e); 461 } 462 } 463 } 464}