fastcomments-sdk
Version:
FastComments API Client - A SDK for interacting with the FastComments API
86 lines • 3.9 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* fastcomments
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfCreateQuestionConfigBody = instanceOfCreateQuestionConfigBody;
exports.CreateQuestionConfigBodyFromJSON = CreateQuestionConfigBodyFromJSON;
exports.CreateQuestionConfigBodyFromJSONTyped = CreateQuestionConfigBodyFromJSONTyped;
exports.CreateQuestionConfigBodyToJSON = CreateQuestionConfigBodyToJSON;
exports.CreateQuestionConfigBodyToJSONTyped = CreateQuestionConfigBodyToJSONTyped;
const QuestionConfigCustomOptionsInner_1 = require("./QuestionConfigCustomOptionsInner");
/**
* Check if a given object implements the CreateQuestionConfigBody interface.
*/
function instanceOfCreateQuestionConfigBody(value) {
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('question' in value) || value['question'] === undefined)
return false;
if (!('type' in value) || value['type'] === undefined)
return false;
if (!('reportingOrder' in value) || value['reportingOrder'] === undefined)
return false;
return true;
}
function CreateQuestionConfigBodyFromJSON(json) {
return CreateQuestionConfigBodyFromJSONTyped(json, false);
}
function CreateQuestionConfigBodyFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
...json,
'name': json['name'],
'question': json['question'],
'helpText': json['helpText'] == null ? undefined : json['helpText'],
'type': json['type'],
'numStars': json['numStars'] == null ? undefined : json['numStars'],
'min': json['min'] == null ? undefined : json['min'],
'max': json['max'] == null ? undefined : json['max'],
'defaultValue': json['defaultValue'] == null ? undefined : json['defaultValue'],
'labelNegative': json['labelNegative'] == null ? undefined : json['labelNegative'],
'labelPositive': json['labelPositive'] == null ? undefined : json['labelPositive'],
'customOptions': json['customOptions'] == null ? undefined : (json['customOptions'].map(QuestionConfigCustomOptionsInner_1.QuestionConfigCustomOptionsInnerFromJSON)),
'subQuestionIds': json['subQuestionIds'] == null ? undefined : json['subQuestionIds'],
'alwaysShowSubQuestions': json['alwaysShowSubQuestions'] == null ? undefined : json['alwaysShowSubQuestions'],
'reportingOrder': json['reportingOrder'],
};
}
function CreateQuestionConfigBodyToJSON(json) {
return CreateQuestionConfigBodyToJSONTyped(json, false);
}
function CreateQuestionConfigBodyToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
...value,
'name': value['name'],
'question': value['question'],
'helpText': value['helpText'],
'type': value['type'],
'numStars': value['numStars'],
'min': value['min'],
'max': value['max'],
'defaultValue': value['defaultValue'],
'labelNegative': value['labelNegative'],
'labelPositive': value['labelPositive'],
'customOptions': value['customOptions'] == null ? undefined : (value['customOptions'].map(QuestionConfigCustomOptionsInner_1.QuestionConfigCustomOptionsInnerToJSON)),
'subQuestionIds': value['subQuestionIds'],
'alwaysShowSubQuestions': value['alwaysShowSubQuestions'],
'reportingOrder': value['reportingOrder'],
};
}
//# sourceMappingURL=CreateQuestionConfigBody.js.map