1 /**
  2  * @fileOverview JavaScript representation of the Finesse Team Not Ready Reason Code Assignment object.
  3  *
  4  * @name finesse.restservices.TeamNotReadyReasonCode
  5  * @requires finesse.clientservices.ClientServices
  6  * @requires Class
  7  * @requires finesse.FinesseBase
  8  * @requires finesse.restservices.RestBase
  9  */
 10 
 11 var finesse = finesse || {};
 12 finesse.restservices = finesse.restservices || {};
 13 
 14 /** @private */
 15 finesse.restservices.TeamNotReadyReasonCode = finesse.restservices.RestBase.extend(/** @lends finesse.restservices.TeamNotReadyReasonCode.prototype */{
 16 
 17     /**
 18      * @class
 19      * JavaScript representation of a Team Not Ready ReasonCode object. Also exposes
 20      * methods to operate on the object against the server.
 21      *
 22 	 * @param {Object} options
 23 	 *     An object with the following properties:<ul>
 24      *         <li><b>id:</b> The id of the object being constructed</li>
 25      *         <li><b>onLoad(this): (optional)</b> when the object is successfully loaded from the server</li>
 26      *         <li><b>onChange(this): (optional)</b> when an update notification of the object is received</li>
 27      *         <li><b>onAdd(this): (optional)</b> when a notification that the object is created is received</li>
 28      *         <li><b>onDelete(this): (optional)</b> when a notification that the object is deleted is received</li>
 29      *         <li><b>onError(rsp): (optional)</b> if loading of the object fails, invoked with the error response object:<ul>
 30      *             <li><b>status:</b> {Number} The HTTP status code returned</li>
 31      *             <li><b>content:</b> {String} Raw string of response</li>
 32      *             <li><b>object:</b> {Object} Parsed object of response</li>
 33      *             <li><b>error:</b> {Object} Wrapped exception that was caught:<ul>
 34      *                 <li><b>errorType:</b> {String} Type of error that was caught</li>
 35      *                 <li><b>errorMessage:</b> {String} Message associated with error</li>
 36      *             </ul></li>
 37      *         </ul></li>
 38      *         <li><b>parentObj: (optional)</b> The parent object</li></ul>
 39      * @constructs finesse.restservices.TeamNotReadyReasonCode
 40      **/
 41     init: function (options) {
 42         this._super(options);
 43     },
 44 
 45     /**
 46      * @private
 47      * Gets the REST class for the current object - this is the TeamNotReadyReasonCode class.
 48      * @returns {Object} The TeamNotReadyReasonCode class.
 49      */
 50     getRestClass: function () {
 51         return finesse.restservices.TeamNotReadyReasonCode;
 52     },
 53 
 54     /**
 55      * @private
 56      * Gets the REST type for the current object - this is a "ReasonCode".
 57      * @returns {String} The ReasonCode string.
 58      */
 59     getRestType: function () {
 60         return "ReasonCode";
 61     },
 62 
 63     /**
 64      * @private
 65      * Override default to indicate that this object doesn't support making
 66      * requests.
 67      */
 68     supportsRequests: false,
 69 
 70     /**
 71      * @private
 72      * Override default to indicate that this object doesn't support subscriptions.
 73      */
 74     supportsSubscriptions: false,
 75 
 76     /**
 77      * Getter for the category.
 78      * @returns {String} The category.
 79      */
 80     getCategory: function () {
 81         this.isLoaded();
 82         return this.getData().category;
 83     },
 84 
 85     /**
 86      * Getter for the code.
 87      * @returns {String} The code.
 88      */
 89     getCode: function () {
 90         this.isLoaded();
 91         return this.getData().code;
 92     },
 93 
 94     /**
 95      * Getter for the label.
 96      * @returns {String} The label.
 97      */
 98     getLabel: function () {
 99         this.isLoaded();
100         return this.getData().label;
101     },
102 
103     /**
104      * Getter for the forAll value.
105      * @returns {String} The forAll.
106      */
107     getForAll: function () {
108         this.isLoaded();
109         return this.getData().forAll;
110     },
111 
112     /**
113      * Getter for the Uri value.
114      * @returns {String} The Uri.
115      */
116     getUri: function () {
117         this.isLoaded();
118         return this.getData().uri;
119     }
120 
121 });
122 
123