umbraco-management-api-client
Version:
TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)
68 lines (67 loc) • 2.69 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* Umbraco Management API
* This shows all APIs available in this version of Umbraco - including all the legacy apis that are available for backward compatibility
*
* The version of the OpenAPI document: Latest
*
*
* 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.instanceOfInviteUserRequestModel = instanceOfInviteUserRequestModel;
exports.InviteUserRequestModelFromJSON = InviteUserRequestModelFromJSON;
exports.InviteUserRequestModelFromJSONTyped = InviteUserRequestModelFromJSONTyped;
exports.InviteUserRequestModelToJSON = InviteUserRequestModelToJSON;
exports.InviteUserRequestModelToJSONTyped = InviteUserRequestModelToJSONTyped;
const PostUserGroupByIdUsersRequestInner_1 = require("./PostUserGroupByIdUsersRequestInner");
/**
* Check if a given object implements the InviteUserRequestModel interface.
*/
function instanceOfInviteUserRequestModel(value) {
if (!('email' in value) || value['email'] === undefined)
return false;
if (!('userName' in value) || value['userName'] === undefined)
return false;
if (!('name' in value) || value['name'] === undefined)
return false;
if (!('userGroupIds' in value) || value['userGroupIds'] === undefined)
return false;
return true;
}
function InviteUserRequestModelFromJSON(json) {
return InviteUserRequestModelFromJSONTyped(json, false);
}
function InviteUserRequestModelFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'email': json['email'],
'userName': json['userName'],
'name': json['name'],
'userGroupIds': (new Set(json['userGroupIds'].map(PostUserGroupByIdUsersRequestInner_1.PostUserGroupByIdUsersRequestInnerFromJSON))),
'id': json['id'] == null ? undefined : json['id'],
'message': json['message'] == null ? undefined : json['message'],
};
}
function InviteUserRequestModelToJSON(json) {
return InviteUserRequestModelToJSONTyped(json, false);
}
function InviteUserRequestModelToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'email': value['email'],
'userName': value['userName'],
'name': value['name'],
'userGroupIds': (Array.from(value['userGroupIds']).map(PostUserGroupByIdUsersRequestInner_1.PostUserGroupByIdUsersRequestInnerToJSON)),
'id': value['id'],
'message': value['message'],
};
}