001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.http.annotation; 014 015import java.lang.annotation.*; 016 017import org.apache.juneau.httppart.*; 018import org.apache.juneau.jsonschema.annotation.*; 019 020/** 021 * A concrete implementation of the {@link ResponseHeader} annotation. 022 */ 023public class ResponseHeaderAnnotation implements ResponseHeader { 024 025 private int[] code={}; 026 private String name="", n="", value="", type="", t="", format="", f="", collectionFormat="", cf="", $ref="", maximum="", max="", minimum="", min="", multipleOf="", mo="", pattern="", p=""; 027 private Class<? extends HttpPartSerializer> serializer = HttpPartSerializer.Null.class; 028 private String[] description={}, d={}, _default={}, df={}, _enum={}, e={}, example={}, ex={}, api={}; 029 private long maxLength=-1, maxl=-1, minLength=-1, minl=-1, maxItems=-1, maxi=-1, minItems=-1, mini=-1; 030 private boolean exclusiveMaximum, emax, exclusiveMinimum, emin, uniqueItems, ui; 031 private Items items = new ItemsAnnotation(); 032 033 @Override /* ResponseHeader */ /* Annotation */ 034 public Class<? extends Annotation> annotationType() { 035 return ResponseHeader.class; 036 } 037 038 @Override /* ResponseHeader */ 039 public int[] code() { 040 return code; 041 } 042 043 /** 044 * Sets the <c>code</c> property on this annotation. 045 * 046 * @param value The new value for this property. 047 * @return This object (for method chaining). 048 */ 049 public ResponseHeaderAnnotation code(int[] value) { 050 this.code = value; 051 return this; 052 } 053 054 @Override /* ResponseHeader */ 055 public String name() { 056 return name; 057 } 058 059 /** 060 * Sets the <c>name</c> property on this annotation. 061 * 062 * @param value The new value for this property. 063 * @return This object (for method chaining). 064 */ 065 public ResponseHeaderAnnotation name(String value) { 066 this.name = value; 067 return this; 068 } 069 070 @Override /* ResponseHeader */ 071 public String n() { 072 return n; 073 } 074 075 /** 076 * Sets the <c>n</c> property on this annotation. 077 * 078 * @param value The new value for this property. 079 * @return This object (for method chaining). 080 */ 081 public ResponseHeaderAnnotation n(String value) { 082 this.n = value; 083 return this; 084 } 085 086 @Override /* ResponseHeader */ 087 public String value() { 088 return value; 089 } 090 091 /** 092 * Sets the <c>value</c> property on this annotation. 093 * 094 * @param value The new value for this property. 095 * @return This object (for method chaining). 096 */ 097 public ResponseHeaderAnnotation value(String value) { 098 this.value = value; 099 return this; 100 } 101 102 @Override /* ResponseHeader */ 103 public Class<? extends HttpPartSerializer> serializer() { 104 return serializer; 105 } 106 107 /** 108 * Sets the <c>serializer</c> property on this annotation. 109 * 110 * @param value The new value for this property. 111 * @return This object (for method chaining). 112 */ 113 public ResponseHeaderAnnotation serializer(Class<? extends HttpPartSerializer> value) { 114 this.serializer = value; 115 return this; 116 } 117 118 @Override /* ResponseHeader */ 119 public String[] description() { 120 return description; 121 } 122 123 /** 124 * Sets the <c>description</c> property on this annotation. 125 * 126 * @param value The new value for this property. 127 * @return This object (for method chaining). 128 */ 129 public ResponseHeaderAnnotation description(String[] value) { 130 this.description = value; 131 return this; 132 } 133 134 @Override /* ResponseHeader */ 135 public String[] d() { 136 return d; 137 } 138 139 /** 140 * Sets the <c>d</c> property on this annotation. 141 * 142 * @param value The new value for this property. 143 * @return This object (for method chaining). 144 */ 145 public ResponseHeaderAnnotation d(String[] value) { 146 this.d = value; 147 return this; 148 } 149 150 @Override /* ResponseHeader */ 151 public String type() { 152 return type; 153 } 154 155 /** 156 * Sets the <c>type</c> property on this annotation. 157 * 158 * @param value The new value for this property. 159 * @return This object (for method chaining). 160 */ 161 public ResponseHeaderAnnotation type(String value) { 162 this.type = value; 163 return this; 164 } 165 166 @Override /* ResponseHeader */ 167 public String t() { 168 return t; 169 } 170 171 /** 172 * Sets the <c>t</c> property on this annotation. 173 * 174 * @param value The new value for this property. 175 * @return This object (for method chaining). 176 */ 177 public ResponseHeaderAnnotation t(String value) { 178 this.t = value; 179 return this; 180 } 181 182 @Override /* ResponseHeader */ 183 public String format() { 184 return format; 185 } 186 187 /** 188 * Sets the <c>format</c> property on this annotation. 189 * 190 * @param value The new value for this property. 191 * @return This object (for method chaining). 192 */ 193 public ResponseHeaderAnnotation format(String value) { 194 this.format = value; 195 return this; 196 } 197 198 @Override /* ResponseHeader */ 199 public String f() { 200 return f; 201 } 202 203 /** 204 * Sets the <c>f</c> property on this annotation. 205 * 206 * @param value The new value for this property. 207 * @return This object (for method chaining). 208 */ 209 public ResponseHeaderAnnotation f(String value) { 210 this.f = value; 211 return this; 212 } 213 214 @Override /* ResponseHeader */ 215 public String collectionFormat() { 216 return collectionFormat; 217 } 218 219 /** 220 * Sets the <c>collectionFormat</c> property on this annotation. 221 * 222 * @param value The new value for this property. 223 * @return This object (for method chaining). 224 */ 225 public ResponseHeaderAnnotation collectionFormat(String value) { 226 this.collectionFormat = value; 227 return this; 228 } 229 230 @Override /* ResponseHeader */ 231 public String cf() { 232 return cf; 233 } 234 235 /** 236 * Sets the <c>cf</c> property on this annotation. 237 * 238 * @param value The new value for this property. 239 * @return This object (for method chaining). 240 */ 241 public ResponseHeaderAnnotation cf(String value) { 242 this.cf = value; 243 return this; 244 } 245 246 @Override /* ResponseHeader */ 247 public String $ref() { 248 return $ref; 249 } 250 251 /** 252 * Sets the <c>$ref</c> property on this annotation. 253 * 254 * @param value The new value for this property. 255 * @return This object (for method chaining). 256 */ 257 public ResponseHeaderAnnotation $ref(String value) { 258 this.$ref = value; 259 return this; 260 } 261 262 @Override /* ResponseHeader */ 263 public String maximum() { 264 return maximum; 265 } 266 267 /** 268 * Sets the <c>maximum</c> property on this annotation. 269 * 270 * @param value The new value for this property. 271 * @return This object (for method chaining). 272 */ 273 public ResponseHeaderAnnotation maximum(String value) { 274 this.maximum = value; 275 return this; 276 } 277 278 @Override /* ResponseHeader */ 279 public String max() { 280 return max; 281 } 282 283 /** 284 * Sets the <c>max</c> property on this annotation. 285 * 286 * @param value The new value for this property. 287 * @return This object (for method chaining). 288 */ 289 public ResponseHeaderAnnotation max(String value) { 290 this.max = value; 291 return this; 292 } 293 294 @Override /* ResponseHeader */ 295 public String minimum() { 296 return minimum; 297 } 298 299 /** 300 * Sets the <c>minimum</c> property on this annotation. 301 * 302 * @param value The new value for this property. 303 * @return This object (for method chaining). 304 */ 305 public ResponseHeaderAnnotation minimum(String value) { 306 this.minimum = value; 307 return this; 308 } 309 310 @Override /* ResponseHeader */ 311 public String min() { 312 return min; 313 } 314 315 /** 316 * Sets the <c>min</c> property on this annotation. 317 * 318 * @param value The new value for this property. 319 * @return This object (for method chaining). 320 */ 321 public ResponseHeaderAnnotation min(String value) { 322 this.min = value; 323 return this; 324 } 325 326 @Override /* ResponseHeader */ 327 public String multipleOf() { 328 return multipleOf; 329 } 330 331 /** 332 * Sets the <c>multipleOf</c> property on this annotation. 333 * 334 * @param value The new value for this property. 335 * @return This object (for method chaining). 336 */ 337 public ResponseHeaderAnnotation multipleOf(String value) { 338 this.multipleOf = value; 339 return this; 340 } 341 342 @Override /* ResponseHeader */ 343 public String mo() { 344 return mo; 345 } 346 347 /** 348 * Sets the <c>mo</c> property on this annotation. 349 * 350 * @param value The new value for this property. 351 * @return This object (for method chaining). 352 */ 353 public ResponseHeaderAnnotation mo(String value) { 354 this.mo = value; 355 return this; 356 } 357 358 @Override /* ResponseHeader */ 359 public long maxLength() { 360 return maxLength; 361 } 362 363 /** 364 * Sets the <c>maxLength</c> property on this annotation. 365 * 366 * @param value The new value for this property. 367 * @return This object (for method chaining). 368 */ 369 public ResponseHeaderAnnotation maxLength(long value) { 370 this.maxLength = value; 371 return this; 372 } 373 374 @Override /* ResponseHeader */ 375 public long maxl() { 376 return maxl; 377 } 378 379 /** 380 * Sets the <c>maxl</c> property on this annotation. 381 * 382 * @param value The new value for this property. 383 * @return This object (for method chaining). 384 */ 385 public ResponseHeaderAnnotation maxl(long value) { 386 this.maxl = value; 387 return this; 388 } 389 390 @Override /* ResponseHeader */ 391 public long minLength() { 392 return minLength; 393 } 394 395 /** 396 * Sets the <c>minLength</c> property on this annotation. 397 * 398 * @param value The new value for this property. 399 * @return This object (for method chaining). 400 */ 401 public ResponseHeaderAnnotation minLength(long value) { 402 this.minLength = value; 403 return this; 404 } 405 406 @Override /* ResponseHeader */ 407 public long minl() { 408 return minl; 409 } 410 411 /** 412 * Sets the <c>minl</c> property on this annotation. 413 * 414 * @param value The new value for this property. 415 * @return This object (for method chaining). 416 */ 417 public ResponseHeaderAnnotation minl(long value) { 418 this.minl = value; 419 return this; 420 } 421 422 @Override /* ResponseHeader */ 423 public String pattern() { 424 return pattern; 425 } 426 427 /** 428 * Sets the <c>pattern</c> property on this annotation. 429 * 430 * @param value The new value for this property. 431 * @return This object (for method chaining). 432 */ 433 public ResponseHeaderAnnotation pattern(String value) { 434 this.pattern = value; 435 return this; 436 } 437 438 @Override /* ResponseHeader */ 439 public String p() { 440 return p; 441 } 442 443 /** 444 * Sets the <c>p</c> property on this annotation. 445 * 446 * @param value The new value for this property. 447 * @return This object (for method chaining). 448 */ 449 public ResponseHeaderAnnotation p(String value) { 450 this.p = value; 451 return this; 452 } 453 454 @Override /* ResponseHeader */ 455 public long maxItems() { 456 return maxItems; 457 } 458 459 /** 460 * Sets the <c>maxItems</c> property on this annotation. 461 * 462 * @param value The new value for this property. 463 * @return This object (for method chaining). 464 */ 465 public ResponseHeaderAnnotation maxItems(long value) { 466 this.maxItems = value; 467 return this; 468 } 469 470 @Override /* ResponseHeader */ 471 public long maxi() { 472 return maxi; 473 } 474 475 /** 476 * Sets the <c>maxi</c> property on this annotation. 477 * 478 * @param value The new value for this property. 479 * @return This object (for method chaining). 480 */ 481 public ResponseHeaderAnnotation maxi(long value) { 482 this.maxi = value; 483 return this; 484 } 485 486 @Override /* ResponseHeader */ 487 public long minItems() { 488 return minItems; 489 } 490 491 /** 492 * Sets the <c>minItems</c> property on this annotation. 493 * 494 * @param value The new value for this property. 495 * @return This object (for method chaining). 496 */ 497 public ResponseHeaderAnnotation minItems(long value) { 498 this.minItems = value; 499 return this; 500 } 501 502 @Override /* ResponseHeader */ 503 public long mini() { 504 return mini; 505 } 506 507 /** 508 * Sets the <c>mini</c> property on this annotation. 509 * 510 * @param value The new value for this property. 511 * @return This object (for method chaining). 512 */ 513 public ResponseHeaderAnnotation mini(long value) { 514 this.mini = value; 515 return this; 516 } 517 518 @Override /* ResponseHeader */ 519 public boolean exclusiveMaximum() { 520 return exclusiveMaximum; 521 } 522 523 /** 524 * Sets the <c>exclusiveMaximum</c> property on this annotation. 525 * 526 * @param value The new value for this property. 527 * @return This object (for method chaining). 528 */ 529 public ResponseHeaderAnnotation exclusiveMaximum(boolean value) { 530 this.exclusiveMaximum = value; 531 return this; 532 } 533 534 @Override /* ResponseHeader */ 535 public boolean emax() { 536 return emax; 537 } 538 539 /** 540 * Sets the <c>emax</c> property on this annotation. 541 * 542 * @param value The new value for this property. 543 * @return This object (for method chaining). 544 */ 545 public ResponseHeaderAnnotation emax(boolean value) { 546 this.emax = value; 547 return this; 548 } 549 550 @Override /* ResponseHeader */ 551 public boolean exclusiveMinimum() { 552 return exclusiveMinimum; 553 } 554 555 /** 556 * Sets the <c>exclusiveMinimum</c> property on this annotation. 557 * 558 * @param value The new value for this property. 559 * @return This object (for method chaining). 560 */ 561 public ResponseHeaderAnnotation exclusiveMinimum(boolean value) { 562 this.exclusiveMinimum = value; 563 return this; 564 } 565 566 @Override /* ResponseHeader */ 567 public boolean emin() { 568 return emin; 569 } 570 571 /** 572 * Sets the <c>emin</c> property on this annotation. 573 * 574 * @param value The new value for this property. 575 * @return This object (for method chaining). 576 */ 577 public ResponseHeaderAnnotation emin(boolean value) { 578 this.emin = value; 579 return this; 580 } 581 582 @Override /* ResponseHeader */ 583 public boolean uniqueItems() { 584 return uniqueItems; 585 } 586 587 /** 588 * Sets the <c>uniqueItems</c> property on this annotation. 589 * 590 * @param value The new value for this property. 591 * @return This object (for method chaining). 592 */ 593 public ResponseHeaderAnnotation uniqueItems(boolean value) { 594 this.uniqueItems = value; 595 return this; 596 } 597 598 @Override /* ResponseHeader */ 599 public boolean ui() { 600 return ui; 601 } 602 603 /** 604 * Sets the <c>ui</c> property on this annotation. 605 * 606 * @param value The new value for this property. 607 * @return This object (for method chaining). 608 */ 609 public ResponseHeaderAnnotation ui(boolean value) { 610 this.ui = value; 611 return this; 612 } 613 614 @Override /* ResponseHeader */ 615 public Items items() { 616 return items; 617 } 618 619 /** 620 * Sets the <c>items</c> property on this annotation. 621 * 622 * @param value The new value for this property. 623 * @return This object (for method chaining). 624 */ 625 public ResponseHeaderAnnotation items(Items value) { 626 this.items = value; 627 return this; 628 } 629 630 @Override /* ResponseHeader */ 631 public String[] _default() { 632 return _default; 633 } 634 635 /** 636 * Sets the <c>_default</c> property on this annotation. 637 * 638 * @param value The new value for this property. 639 * @return This object (for method chaining). 640 */ 641 public ResponseHeaderAnnotation _default(String[] value) { 642 this._default = value; 643 return this; 644 } 645 646 @Override /* ResponseHeader */ 647 public String[] df() { 648 return df; 649 } 650 651 /** 652 * Sets the <c>df</c> property on this annotation. 653 * 654 * @param value The new value for this property. 655 * @return This object (for method chaining). 656 */ 657 public ResponseHeaderAnnotation df(String[] value) { 658 this.df = value; 659 return this; 660 } 661 662 @Override /* ResponseHeader */ 663 public String[] _enum() { 664 return _enum; 665 } 666 667 /** 668 * Sets the <c>_enum</c> property on this annotation. 669 * 670 * @param value The new value for this property. 671 * @return This object (for method chaining). 672 */ 673 public ResponseHeaderAnnotation _enum(String[] value) { 674 this._enum = value; 675 return this; 676 } 677 678 @Override /* ResponseHeader */ 679 public String[] e() { 680 return e; 681 } 682 683 /** 684 * Sets the <c>e</c> property on this annotation. 685 * 686 * @param value The new value for this property. 687 * @return This object (for method chaining). 688 */ 689 public ResponseHeaderAnnotation e(String[] value) { 690 this.e = value; 691 return this; 692 } 693 694 @Override /* ResponseHeader */ 695 public String[] example() { 696 return example; 697 } 698 699 /** 700 * Sets the <c>example</c> property on this annotation. 701 * 702 * @param value The new value for this property. 703 * @return This object (for method chaining). 704 */ 705 public ResponseHeaderAnnotation example(String[] value) { 706 this.example = value; 707 return this; 708 } 709 710 @Override /* ResponseHeader */ 711 public String[] ex() { 712 return ex; 713 } 714 715 /** 716 * Sets the <c>ex</c> property on this annotation. 717 * 718 * @param value The new value for this property. 719 * @return This object (for method chaining). 720 */ 721 public ResponseHeaderAnnotation ex(String[] value) { 722 this.ex = value; 723 return this; 724 } 725 726 @Override /* ResponseHeader */ 727 public String[] api() { 728 return api; 729 } 730 731 /** 732 * Sets the <c>api</c> property on this annotation. 733 * 734 * @param value The new value for this property. 735 * @return This object (for method chaining). 736 */ 737 public ResponseHeaderAnnotation api(String[] value) { 738 this.api = value; 739 return this; 740 } 741}