@vectorize-io/vectorize-client
Version:
Client for the Vectorize API
94 lines (93 loc) • 3.38 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* Vectorize API
* API for Vectorize services (Beta)
*
* The version of the OpenAPI document: 0.1.2
*
*
* 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.GITHUBConfigIssueStatusEnum = exports.GITHUBConfigPullRequestStatusEnum = void 0;
exports.instanceOfGITHUBConfig = instanceOfGITHUBConfig;
exports.GITHUBConfigFromJSON = GITHUBConfigFromJSON;
exports.GITHUBConfigFromJSONTyped = GITHUBConfigFromJSONTyped;
exports.GITHUBConfigToJSON = GITHUBConfigToJSON;
exports.GITHUBConfigToJSONTyped = GITHUBConfigToJSONTyped;
/**
* @export
*/
exports.GITHUBConfigPullRequestStatusEnum = {
All: 'all',
Open: 'open',
Closed: 'closed',
Merged: 'merged'
};
/**
* @export
*/
exports.GITHUBConfigIssueStatusEnum = {
All: 'all',
Open: 'open',
Closed: 'closed'
};
/**
* Check if a given object implements the GITHUBConfig interface.
*/
function instanceOfGITHUBConfig(value) {
if (!('repositories' in value) || value['repositories'] === undefined)
return false;
if (!('includePullRequests' in value) || value['includePullRequests'] === undefined)
return false;
if (!('pullRequestStatus' in value) || value['pullRequestStatus'] === undefined)
return false;
if (!('includeIssues' in value) || value['includeIssues'] === undefined)
return false;
if (!('issueStatus' in value) || value['issueStatus'] === undefined)
return false;
return true;
}
function GITHUBConfigFromJSON(json) {
return GITHUBConfigFromJSONTyped(json, false);
}
function GITHUBConfigFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'repositories': json['repositories'],
'includePullRequests': json['include-pull-requests'],
'pullRequestStatus': json['pull-request-status'],
'pullRequestLabels': json['pull-request-labels'] == null ? undefined : json['pull-request-labels'],
'includeIssues': json['include-issues'],
'issueStatus': json['issue-status'],
'issueLabels': json['issue-labels'] == null ? undefined : json['issue-labels'],
'maxItems': json['max-items'] == null ? undefined : json['max-items'],
'createdAfter': json['created-after'] == null ? undefined : (new Date(json['created-after'])),
};
}
function GITHUBConfigToJSON(json) {
return GITHUBConfigToJSONTyped(json, false);
}
function GITHUBConfigToJSONTyped(value, ignoreDiscriminator) {
if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
if (value == null) {
return value;
}
return {
'repositories': value['repositories'],
'include-pull-requests': value['includePullRequests'],
'pull-request-status': value['pullRequestStatus'],
'pull-request-labels': value['pullRequestLabels'],
'include-issues': value['includeIssues'],
'issue-status': value['issueStatus'],
'issue-labels': value['issueLabels'],
'max-items': value['maxItems'],
'created-after': value['createdAfter'] == null ? undefined : ((value['createdAfter']).toISOString().substring(0, 10)),
};
}
;