UNPKG

umbraco-management-api-client

Version:

TypeScript client for the Umbraco Management API (auto-generated by OpenAPI Generator)

71 lines (70 loc) 2.86 kB
"use strict"; /* 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.instanceOfCreateUserRequestModel = instanceOfCreateUserRequestModel; exports.CreateUserRequestModelFromJSON = CreateUserRequestModelFromJSON; exports.CreateUserRequestModelFromJSONTyped = CreateUserRequestModelFromJSONTyped; exports.CreateUserRequestModelToJSON = CreateUserRequestModelToJSON; exports.CreateUserRequestModelToJSONTyped = CreateUserRequestModelToJSONTyped; const UserKindModel_1 = require("./UserKindModel"); const PostUserGroupByIdUsersRequestInner_1 = require("./PostUserGroupByIdUsersRequestInner"); /** * Check if a given object implements the CreateUserRequestModel interface. */ function instanceOfCreateUserRequestModel(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; if (!('kind' in value) || value['kind'] === undefined) return false; return true; } function CreateUserRequestModelFromJSON(json) { return CreateUserRequestModelFromJSONTyped(json, false); } function CreateUserRequestModelFromJSONTyped(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'], 'kind': (0, UserKindModel_1.UserKindModelFromJSON)(json['kind']), }; } function CreateUserRequestModelToJSON(json) { return CreateUserRequestModelToJSONTyped(json, false); } function CreateUserRequestModelToJSONTyped(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'], 'kind': (0, UserKindModel_1.UserKindModelToJSON)(value['kind']), }; }