@microsoft/msgraph-sdk
Version:
Microsoft Graph JavaScript client library
483 lines • 24.9 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createKeyValueFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeEntity, serializeKeyValue } from '../index.js';
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {GroupCollectionResponse}
*/
// @ts-ignore
export function createGroupCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoGroupCollectionResponse;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {Group}
*/
// @ts-ignore
export function createGroupFromDiscriminatorValue(parseNode) {
return deserializeIntoGroup;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {LocalizedDescription}
*/
// @ts-ignore
export function createLocalizedDescriptionFromDiscriminatorValue(parseNode) {
return deserializeIntoLocalizedDescription;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {LocalizedLabel}
*/
// @ts-ignore
export function createLocalizedLabelFromDiscriminatorValue(parseNode) {
return deserializeIntoLocalizedLabel;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {LocalizedName}
*/
// @ts-ignore
export function createLocalizedNameFromDiscriminatorValue(parseNode) {
return deserializeIntoLocalizedName;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {RelationCollectionResponse}
*/
// @ts-ignore
export function createRelationCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoRelationCollectionResponse;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {Relation}
*/
// @ts-ignore
export function createRelationFromDiscriminatorValue(parseNode) {
return deserializeIntoRelation;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {SetCollectionResponse}
*/
// @ts-ignore
export function createSetCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoSetCollectionResponse;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {Set}
*/
// @ts-ignore
export function createSetFromDiscriminatorValue(parseNode) {
return deserializeIntoSet;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {StoreCollectionResponse}
*/
// @ts-ignore
export function createStoreCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoStoreCollectionResponse;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {Store}
*/
// @ts-ignore
export function createStoreFromDiscriminatorValue(parseNode) {
return deserializeIntoStore;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {TermCollectionResponse}
*/
// @ts-ignore
export function createTermCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoTermCollectionResponse;
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @returns {Term}
*/
// @ts-ignore
export function createTermFromDiscriminatorValue(parseNode) {
return deserializeIntoTerm;
}
/**
* The deserialization information for the current model
* @param Group The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoGroup(group = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(group)), { "createdDateTime": n => { group.createdDateTime = n.getDateValue(); }, "description": n => { group.description = n.getStringValue(); }, "displayName": n => { group.displayName = n.getStringValue(); }, "parentSiteId": n => { group.parentSiteId = n.getStringValue(); }, "scope": n => { group.scope = n.getEnumValue(TermGroupScopeObject); }, "sets": n => { group.sets = n.getCollectionOfObjectValues(createSetFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param GroupCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoGroupCollectionResponse(groupCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(groupCollectionResponse)), { "value": n => { groupCollectionResponse.value = n.getCollectionOfObjectValues(createGroupFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param LocalizedDescription The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoLocalizedDescription(localizedDescription = {}) {
return {
"backingStoreEnabled": n => { localizedDescription.backingStoreEnabled = true; },
"description": n => { localizedDescription.description = n.getStringValue(); },
"languageTag": n => { localizedDescription.languageTag = n.getStringValue(); },
"@odata.type": n => { localizedDescription.odataType = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param LocalizedLabel The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoLocalizedLabel(localizedLabel = {}) {
return {
"backingStoreEnabled": n => { localizedLabel.backingStoreEnabled = true; },
"isDefault": n => { localizedLabel.isDefault = n.getBooleanValue(); },
"languageTag": n => { localizedLabel.languageTag = n.getStringValue(); },
"name": n => { localizedLabel.name = n.getStringValue(); },
"@odata.type": n => { localizedLabel.odataType = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param LocalizedName The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoLocalizedName(localizedName = {}) {
return {
"backingStoreEnabled": n => { localizedName.backingStoreEnabled = true; },
"languageTag": n => { localizedName.languageTag = n.getStringValue(); },
"name": n => { localizedName.name = n.getStringValue(); },
"@odata.type": n => { localizedName.odataType = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param Relation The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoRelation(relation = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(relation)), { "fromTerm": n => { relation.fromTerm = n.getObjectValue(createTermFromDiscriminatorValue); }, "relationship": n => { relation.relationship = n.getEnumValue(RelationTypeObject); }, "set": n => { relation.set = n.getObjectValue(createSetFromDiscriminatorValue); }, "toTerm": n => { relation.toTerm = n.getObjectValue(createTermFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param RelationCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoRelationCollectionResponse(relationCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(relationCollectionResponse)), { "value": n => { relationCollectionResponse.value = n.getCollectionOfObjectValues(createRelationFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param Set The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSet(set = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(set)), { "children": n => { set.children = n.getCollectionOfObjectValues(createTermFromDiscriminatorValue); }, "createdDateTime": n => { set.createdDateTime = n.getDateValue(); }, "description": n => { set.description = n.getStringValue(); }, "localizedNames": n => { set.localizedNames = n.getCollectionOfObjectValues(createLocalizedNameFromDiscriminatorValue); }, "parentGroup": n => { set.parentGroup = n.getObjectValue(createGroupFromDiscriminatorValue); }, "properties": n => { set.properties = n.getCollectionOfObjectValues(createKeyValueFromDiscriminatorValue); }, "relations": n => { set.relations = n.getCollectionOfObjectValues(createRelationFromDiscriminatorValue); }, "terms": n => { set.terms = n.getCollectionOfObjectValues(createTermFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param SetCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSetCollectionResponse(setCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(setCollectionResponse)), { "value": n => { setCollectionResponse.value = n.getCollectionOfObjectValues(createSetFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param Store The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoStore(store = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(store)), { "defaultLanguageTag": n => { store.defaultLanguageTag = n.getStringValue(); }, "groups": n => { store.groups = n.getCollectionOfObjectValues(createGroupFromDiscriminatorValue); }, "languageTags": n => { store.languageTags = n.getCollectionOfPrimitiveValues(); }, "sets": n => { store.sets = n.getCollectionOfObjectValues(createSetFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param StoreCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoStoreCollectionResponse(storeCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(storeCollectionResponse)), { "value": n => { storeCollectionResponse.value = n.getCollectionOfObjectValues(createStoreFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param Term The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoTerm(term = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(term)), { "children": n => { term.children = n.getCollectionOfObjectValues(createTermFromDiscriminatorValue); }, "createdDateTime": n => { term.createdDateTime = n.getDateValue(); }, "descriptions": n => { term.descriptions = n.getCollectionOfObjectValues(createLocalizedDescriptionFromDiscriminatorValue); }, "labels": n => { term.labels = n.getCollectionOfObjectValues(createLocalizedLabelFromDiscriminatorValue); }, "lastModifiedDateTime": n => { term.lastModifiedDateTime = n.getDateValue(); }, "properties": n => { term.properties = n.getCollectionOfObjectValues(createKeyValueFromDiscriminatorValue); }, "relations": n => { term.relations = n.getCollectionOfObjectValues(createRelationFromDiscriminatorValue); }, "set": n => { term.set = n.getObjectValue(createSetFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param TermCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoTermCollectionResponse(termCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(termCollectionResponse)), { "value": n => { termCollectionResponse.value = n.getCollectionOfObjectValues(createTermFromDiscriminatorValue); } });
}
/**
* Serializes information the current object
* @param Group The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeGroup(writer, group = {}, isSerializingDerivedType = false) {
if (!group || isSerializingDerivedType) {
return;
}
serializeEntity(writer, group, isSerializingDerivedType);
writer.writeDateValue("createdDateTime", group.createdDateTime);
writer.writeStringValue("description", group.description);
writer.writeStringValue("displayName", group.displayName);
writer.writeStringValue("parentSiteId", group.parentSiteId);
writer.writeEnumValue("scope", group.scope);
writer.writeCollectionOfObjectValues("sets", group.sets, serializeSet);
}
/**
* Serializes information the current object
* @param GroupCollectionResponse The instance to serialize from.
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeGroupCollectionResponse(writer, groupCollectionResponse = {}, isSerializingDerivedType = false) {
if (!groupCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, groupCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", groupCollectionResponse.value, serializeGroup);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param LocalizedDescription The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeLocalizedDescription(writer, localizedDescription = {}, isSerializingDerivedType = false) {
if (!localizedDescription || isSerializingDerivedType) {
return;
}
writer.writeStringValue("description", localizedDescription.description);
writer.writeStringValue("languageTag", localizedDescription.languageTag);
writer.writeStringValue("@odata.type", localizedDescription.odataType);
writer.writeAdditionalData(localizedDescription.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param LocalizedLabel The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeLocalizedLabel(writer, localizedLabel = {}, isSerializingDerivedType = false) {
if (!localizedLabel || isSerializingDerivedType) {
return;
}
writer.writeBooleanValue("isDefault", localizedLabel.isDefault);
writer.writeStringValue("languageTag", localizedLabel.languageTag);
writer.writeStringValue("name", localizedLabel.name);
writer.writeStringValue("@odata.type", localizedLabel.odataType);
writer.writeAdditionalData(localizedLabel.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param LocalizedName The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeLocalizedName(writer, localizedName = {}, isSerializingDerivedType = false) {
if (!localizedName || isSerializingDerivedType) {
return;
}
writer.writeStringValue("languageTag", localizedName.languageTag);
writer.writeStringValue("name", localizedName.name);
writer.writeStringValue("@odata.type", localizedName.odataType);
writer.writeAdditionalData(localizedName.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Relation The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeRelation(writer, relation = {}, isSerializingDerivedType = false) {
if (!relation || isSerializingDerivedType) {
return;
}
serializeEntity(writer, relation, isSerializingDerivedType);
writer.writeObjectValue("fromTerm", relation.fromTerm, serializeTerm);
writer.writeEnumValue("relationship", relation.relationship);
writer.writeObjectValue("set", relation.set, serializeSet);
writer.writeObjectValue("toTerm", relation.toTerm, serializeTerm);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param RelationCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeRelationCollectionResponse(writer, relationCollectionResponse = {}, isSerializingDerivedType = false) {
if (!relationCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, relationCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", relationCollectionResponse.value, serializeRelation);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Set The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSet(writer, set = {}, isSerializingDerivedType = false) {
if (!set || isSerializingDerivedType) {
return;
}
serializeEntity(writer, set, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("children", set.children, serializeTerm);
writer.writeDateValue("createdDateTime", set.createdDateTime);
writer.writeStringValue("description", set.description);
writer.writeCollectionOfObjectValues("localizedNames", set.localizedNames, serializeLocalizedName);
writer.writeObjectValue("parentGroup", set.parentGroup, serializeGroup);
writer.writeCollectionOfObjectValues("properties", set.properties, serializeKeyValue);
writer.writeCollectionOfObjectValues("relations", set.relations, serializeRelation);
writer.writeCollectionOfObjectValues("terms", set.terms, serializeTerm);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SetCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSetCollectionResponse(writer, setCollectionResponse = {}, isSerializingDerivedType = false) {
if (!setCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, setCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", setCollectionResponse.value, serializeSet);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Store The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeStore(writer, store = {}, isSerializingDerivedType = false) {
if (!store || isSerializingDerivedType) {
return;
}
serializeEntity(writer, store, isSerializingDerivedType);
writer.writeStringValue("defaultLanguageTag", store.defaultLanguageTag);
writer.writeCollectionOfObjectValues("groups", store.groups, serializeGroup);
writer.writeCollectionOfPrimitiveValues("languageTags", store.languageTags);
writer.writeCollectionOfObjectValues("sets", store.sets, serializeSet);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param StoreCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeStoreCollectionResponse(writer, storeCollectionResponse = {}, isSerializingDerivedType = false) {
if (!storeCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, storeCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", storeCollectionResponse.value, serializeStore);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Term The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeTerm(writer, term = {}, isSerializingDerivedType = false) {
if (!term || isSerializingDerivedType) {
return;
}
serializeEntity(writer, term, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("children", term.children, serializeTerm);
writer.writeDateValue("createdDateTime", term.createdDateTime);
writer.writeCollectionOfObjectValues("descriptions", term.descriptions, serializeLocalizedDescription);
writer.writeCollectionOfObjectValues("labels", term.labels, serializeLocalizedLabel);
writer.writeDateValue("lastModifiedDateTime", term.lastModifiedDateTime);
writer.writeCollectionOfObjectValues("properties", term.properties, serializeKeyValue);
writer.writeCollectionOfObjectValues("relations", term.relations, serializeRelation);
writer.writeObjectValue("set", term.set, serializeSet);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param TermCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeTermCollectionResponse(writer, termCollectionResponse = {}, isSerializingDerivedType = false) {
if (!termCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, termCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", termCollectionResponse.value, serializeTerm);
}
export const RelationTypeObject = {
Pin: "pin",
Reuse: "reuse",
UnknownFutureValue: "unknownFutureValue",
};
export const TermGroupScopeObject = {
Global: "global",
System: "system",
SiteCollection: "siteCollection",
UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map