@@ -20,8 +20,9 @@ var util = require("./util");
2020 * @param {boolean|Object.<string,*> } [responseStream] Whether the response is streamed
2121 * @param {Object.<string,*> } [options] Declared options
2222 * @param {string } [comment] The comment for this method
23+ * @param {Object.<string,*> } [parsedOptions] Declared options, properly parsed into an object
2324 */
24- function Method ( name , type , requestType , responseType , requestStream , responseStream , options , comment ) {
25+ function Method ( name , type , requestType , responseType , requestStream , responseStream , options , comment , parsedOptions ) {
2526
2627 /* istanbul ignore next */
2728 if ( util . isObject ( requestStream ) ) {
@@ -93,6 +94,11 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
9394 * @type {string|null }
9495 */
9596 this . comment = comment ;
97+
98+ /**
99+ * Options properly parsed into an object
100+ */
101+ this . parsedOptions = parsedOptions ;
96102}
97103
98104/**
@@ -104,6 +110,8 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
104110 * @property {boolean } [requestStream=false] Whether requests are streamed
105111 * @property {boolean } [responseStream=false] Whether responses are streamed
106112 * @property {Object.<string,*> } [options] Method options
113+ * @property {string } comment Method comments
114+ * @property {Object.<string,*> } [parsedOptions] Method options properly parsed into an object
107115 */
108116
109117/**
@@ -114,7 +122,7 @@ function Method(name, type, requestType, responseType, requestStream, responseSt
114122 * @throws {TypeError } If arguments are invalid
115123 */
116124Method . fromJSON = function fromJSON ( name , json ) {
117- return new Method ( name , json . type , json . requestType , json . responseType , json . requestStream , json . responseStream , json . options , json . comment ) ;
125+ return new Method ( name , json . type , json . requestType , json . responseType , json . requestStream , json . responseStream , json . options , json . comment , json . parsedOptions ) ;
118126} ;
119127
120128/**
@@ -131,7 +139,8 @@ Method.prototype.toJSON = function toJSON(toJSONOptions) {
131139 "responseType" , this . responseType ,
132140 "responseStream" , this . responseStream ,
133141 "options" , this . options ,
134- "comment" , keepComments ? this . comment : undefined
142+ "comment" , keepComments ? this . comment : undefined ,
143+ "parsedOptions" , this . parsedOptions ,
135144 ] ) ;
136145} ;
137146
0 commit comments