@microsoft/msgraph-beta-sdk
Version:
Microsoft Graph Beta JavaScript client library
720 lines • 35.2 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createDictionaryFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, deserializeIntoEntity, serializeBaseCollectionPaginationCountResponse, serializeDictionary, serializeEntity } 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 {EvaluationCollectionResponse}
*/
// @ts-ignore
export function createEvaluationCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoEvaluationCollectionResponse;
}
/**
* 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 {Evaluation}
*/
// @ts-ignore
export function createEvaluationFromDiscriminatorValue(parseNode) {
return deserializeIntoEvaluation;
}
/**
* 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 {EvaluationResult}
*/
// @ts-ignore
export function createEvaluationResultFromDiscriminatorValue(parseNode) {
return deserializeIntoEvaluationResult;
}
/**
* 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 {PluginAuth}
*/
// @ts-ignore
export function createPluginAuthFromDiscriminatorValue(parseNode) {
return deserializeIntoPluginAuth;
}
/**
* 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 {PluginCollectionResponse}
*/
// @ts-ignore
export function createPluginCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoPluginCollectionResponse;
}
/**
* 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 {Plugin}
*/
// @ts-ignore
export function createPluginFromDiscriminatorValue(parseNode) {
return deserializeIntoPlugin;
}
/**
* 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 {PluginSetting}
*/
// @ts-ignore
export function createPluginSettingFromDiscriminatorValue(parseNode) {
return deserializeIntoPluginSetting;
}
/**
* 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 {PromptCollectionResponse}
*/
// @ts-ignore
export function createPromptCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoPromptCollectionResponse;
}
/**
* 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 {Prompt}
*/
// @ts-ignore
export function createPromptFromDiscriminatorValue(parseNode) {
return deserializeIntoPrompt;
}
/**
* 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 {SessionCollectionResponse}
*/
// @ts-ignore
export function createSessionCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoSessionCollectionResponse;
}
/**
* 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 {Session}
*/
// @ts-ignore
export function createSessionFromDiscriminatorValue(parseNode) {
return deserializeIntoSession;
}
/**
* 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 {SkillInputDescriptor}
*/
// @ts-ignore
export function createSkillInputDescriptorFromDiscriminatorValue(parseNode) {
return deserializeIntoSkillInputDescriptor;
}
/**
* 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 {SkillTypeDescriptor}
*/
// @ts-ignore
export function createSkillTypeDescriptorFromDiscriminatorValue(parseNode) {
return deserializeIntoSkillTypeDescriptor;
}
/**
* 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 {SkillVariableDescriptor}
*/
// @ts-ignore
export function createSkillVariableDescriptorFromDiscriminatorValue(parseNode) {
if (!parseNode)
throw new Error("parseNode cannot be undefined");
const mappingValueNode = parseNode === null || parseNode === void 0 ? void 0 : parseNode.getChildNode("@odata.type");
if (mappingValueNode) {
const mappingValue = mappingValueNode.getStringValue();
if (mappingValue) {
switch (mappingValue) {
case "#microsoft.graph.security.securityCopilot.skillInputDescriptor":
return deserializeIntoSkillInputDescriptor;
}
}
}
return deserializeIntoSkillVariableDescriptor;
}
/**
* 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 {WorkspaceCollectionResponse}
*/
// @ts-ignore
export function createWorkspaceCollectionResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoWorkspaceCollectionResponse;
}
/**
* 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 {Workspace}
*/
// @ts-ignore
export function createWorkspaceFromDiscriminatorValue(parseNode) {
return deserializeIntoWorkspace;
}
/**
* The deserialization information for the current model
* @param Evaluation The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoEvaluation(evaluation = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(evaluation)), { "completedDateTime": n => { evaluation.completedDateTime = n.getDateValue(); }, "createdDateTime": n => { evaluation.createdDateTime = n.getDateValue(); }, "executionCount": n => { evaluation.executionCount = n.getNumberValue(); }, "isCancelled": n => { evaluation.isCancelled = n.getBooleanValue(); }, "lastModifiedDateTime": n => { evaluation.lastModifiedDateTime = n.getDateValue(); }, "result": n => { evaluation.result = n.getObjectValue(createEvaluationResultFromDiscriminatorValue); }, "runStartDateTime": n => { evaluation.runStartDateTime = n.getDateValue(); }, "state": n => { evaluation.state = n.getEnumValue(EvaluationStateObject); } });
}
/**
* The deserialization information for the current model
* @param EvaluationCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoEvaluationCollectionResponse(evaluationCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(evaluationCollectionResponse)), { "value": n => { evaluationCollectionResponse.value = n.getCollectionOfObjectValues(createEvaluationFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param EvaluationResult The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoEvaluationResult(evaluationResult = {}) {
return {
"backingStoreEnabled": n => { evaluationResult.backingStoreEnabled = true; },
"content": n => { evaluationResult.content = n.getStringValue(); },
"@odata.type": n => { evaluationResult.odataType = n.getStringValue(); },
"previewState": n => { evaluationResult.previewState = n.getEnumValue(SkillPreviewStateObject); },
"type": n => { evaluationResult.type = n.getEnumValue(EvaluationResultTypeObject); },
};
}
/**
* The deserialization information for the current model
* @param Plugin The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPlugin(plugin = {}) {
return {
"authorization": n => { plugin.authorization = n.getObjectValue(createPluginAuthFromDiscriminatorValue); },
"backingStoreEnabled": n => { plugin.backingStoreEnabled = true; },
"catalogScope": n => { plugin.catalogScope = n.getEnumValue(PluginCatalogScopeObject); },
"category": n => { plugin.category = n.getEnumValue(PluginCategoryObject); },
"description": n => { plugin.description = n.getStringValue(); },
"displayName": n => { plugin.displayName = n.getStringValue(); },
"isEnabled": n => { plugin.isEnabled = n.getBooleanValue(); },
"name": n => { plugin.name = n.getStringValue(); },
"@odata.type": n => { plugin.odataType = n.getStringValue(); },
"previewState": n => { plugin.previewState = n.getEnumValue(PluginPreviewStatesObject); },
"settings": n => { plugin.settings = n.getCollectionOfObjectValues(createPluginSettingFromDiscriminatorValue); },
"supportedAuthTypes": n => { plugin.supportedAuthTypes = n.getEnumValue(PluginAuthTypesObject); },
};
}
/**
* The deserialization information for the current model
* @param PluginAuth The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPluginAuth(pluginAuth = {}) {
return {
"authType": n => { pluginAuth.authType = n.getEnumValue(PluginAuthTypesObject); },
"backingStoreEnabled": n => { pluginAuth.backingStoreEnabled = true; },
"@odata.type": n => { pluginAuth.odataType = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param PluginCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPluginCollectionResponse(pluginCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(pluginCollectionResponse)), { "value": n => { pluginCollectionResponse.value = n.getCollectionOfObjectValues(createPluginFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param PluginSetting The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPluginSetting(pluginSetting = {}) {
return {
"acceptableValues": n => { pluginSetting.acceptableValues = n.getCollectionOfPrimitiveValues(); },
"backingStoreEnabled": n => { pluginSetting.backingStoreEnabled = true; },
"defaultValue": n => { pluginSetting.defaultValue = n.getStringValue(); },
"description": n => { pluginSetting.description = n.getStringValue(); },
"displayType": n => { pluginSetting.displayType = n.getEnumValue(PluginSettingDisplayTypeObject); },
"hintText": n => { pluginSetting.hintText = n.getStringValue(); },
"isRequired": n => { pluginSetting.isRequired = n.getBooleanValue(); },
"label": n => { pluginSetting.label = n.getStringValue(); },
"name": n => { pluginSetting.name = n.getStringValue(); },
"@odata.type": n => { pluginSetting.odataType = n.getStringValue(); },
"settingValue": n => { pluginSetting.settingValue = n.getEnumValue(PluginSettingTypeObject); },
"value": n => { pluginSetting.value = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param Prompt The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPrompt(prompt = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(prompt)), { "content": n => { prompt.content = n.getStringValue(); }, "createdDateTime": n => { prompt.createdDateTime = n.getDateValue(); }, "evaluations": n => { prompt.evaluations = n.getCollectionOfObjectValues(createEvaluationFromDiscriminatorValue); }, "inputs": n => { prompt.inputs = n.getObjectValue(createDictionaryFromDiscriminatorValue); }, "lastModifiedDateTime": n => { prompt.lastModifiedDateTime = n.getDateValue(); }, "skillInputDescriptors": n => { prompt.skillInputDescriptors = n.getCollectionOfObjectValues(createSkillInputDescriptorFromDiscriminatorValue); }, "skillName": n => { prompt.skillName = n.getStringValue(); }, "type": n => { prompt.type = n.getEnumValue(PromptTypeObject); } });
}
/**
* The deserialization information for the current model
* @param PromptCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoPromptCollectionResponse(promptCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(promptCollectionResponse)), { "value": n => { promptCollectionResponse.value = n.getCollectionOfObjectValues(createPromptFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param Session The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSession(session = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(session)), { "createdDateTime": n => { session.createdDateTime = n.getDateValue(); }, "displayName": n => { session.displayName = n.getStringValue(); }, "lastModifiedDateTime": n => { session.lastModifiedDateTime = n.getDateValue(); }, "prompts": n => { session.prompts = n.getCollectionOfObjectValues(createPromptFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param SessionCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSessionCollectionResponse(sessionCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(sessionCollectionResponse)), { "value": n => { sessionCollectionResponse.value = n.getCollectionOfObjectValues(createSessionFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param SkillInputDescriptor The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSkillInputDescriptor(skillInputDescriptor = {}) {
return Object.assign(Object.assign({}, deserializeIntoSkillVariableDescriptor(skillInputDescriptor)), { "defaultValue": n => { skillInputDescriptor.defaultValue = n.getStringValue(); }, "isRequired": n => { skillInputDescriptor.isRequired = n.getBooleanValue(); }, "placeholderValue": n => { skillInputDescriptor.placeholderValue = n.getStringValue(); } });
}
/**
* The deserialization information for the current model
* @param SkillTypeDescriptor The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSkillTypeDescriptor(skillTypeDescriptor = {}) {
return {
"backingStoreEnabled": n => { skillTypeDescriptor.backingStoreEnabled = true; },
"name": n => { skillTypeDescriptor.name = n.getStringValue(); },
"@odata.type": n => { skillTypeDescriptor.odataType = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param SkillVariableDescriptor The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoSkillVariableDescriptor(skillVariableDescriptor = {}) {
return {
"backingStoreEnabled": n => { skillVariableDescriptor.backingStoreEnabled = true; },
"description": n => { skillVariableDescriptor.description = n.getStringValue(); },
"name": n => { skillVariableDescriptor.name = n.getStringValue(); },
"@odata.type": n => { skillVariableDescriptor.odataType = n.getStringValue(); },
"type": n => { skillVariableDescriptor.type = n.getObjectValue(createSkillTypeDescriptorFromDiscriminatorValue); },
};
}
/**
* The deserialization information for the current model
* @param Workspace The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoWorkspace(workspace = {}) {
return Object.assign(Object.assign({}, deserializeIntoEntity(workspace)), { "displayName": n => { workspace.displayName = n.getStringValue(); }, "plugins": n => { workspace.plugins = n.getCollectionOfObjectValues(createPluginFromDiscriminatorValue); }, "sessions": n => { workspace.sessions = n.getCollectionOfObjectValues(createSessionFromDiscriminatorValue); } });
}
/**
* The deserialization information for the current model
* @param WorkspaceCollectionResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoWorkspaceCollectionResponse(workspaceCollectionResponse = {}) {
return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(workspaceCollectionResponse)), { "value": n => { workspaceCollectionResponse.value = n.getCollectionOfObjectValues(createWorkspaceFromDiscriminatorValue); } });
}
/**
* Serializes information the current object
* @param Evaluation 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 serializeEvaluation(writer, evaluation = {}, isSerializingDerivedType = false) {
if (!evaluation || isSerializingDerivedType) {
return;
}
serializeEntity(writer, evaluation, isSerializingDerivedType);
writer.writeDateValue("completedDateTime", evaluation.completedDateTime);
writer.writeDateValue("createdDateTime", evaluation.createdDateTime);
writer.writeNumberValue("executionCount", evaluation.executionCount);
writer.writeBooleanValue("isCancelled", evaluation.isCancelled);
writer.writeDateValue("lastModifiedDateTime", evaluation.lastModifiedDateTime);
writer.writeObjectValue("result", evaluation.result, serializeEvaluationResult);
writer.writeDateValue("runStartDateTime", evaluation.runStartDateTime);
writer.writeEnumValue("state", evaluation.state);
}
/**
* Serializes information the current object
* @param EvaluationCollectionResponse 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 serializeEvaluationCollectionResponse(writer, evaluationCollectionResponse = {}, isSerializingDerivedType = false) {
if (!evaluationCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, evaluationCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", evaluationCollectionResponse.value, serializeEvaluation);
}
/**
* Serializes information the current object
* @param EvaluationResult 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 serializeEvaluationResult(writer, evaluationResult = {}, isSerializingDerivedType = false) {
if (!evaluationResult || isSerializingDerivedType) {
return;
}
writer.writeStringValue("content", evaluationResult.content);
writer.writeStringValue("@odata.type", evaluationResult.odataType);
writer.writeEnumValue("previewState", evaluationResult.previewState);
writer.writeEnumValue("type", evaluationResult.type);
writer.writeAdditionalData(evaluationResult.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Plugin The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePlugin(writer, plugin = {}, isSerializingDerivedType = false) {
if (!plugin || isSerializingDerivedType) {
return;
}
writer.writeObjectValue("authorization", plugin.authorization, serializePluginAuth);
writer.writeEnumValue("catalogScope", plugin.catalogScope);
writer.writeEnumValue("category", plugin.category);
writer.writeStringValue("description", plugin.description);
writer.writeStringValue("displayName", plugin.displayName);
writer.writeBooleanValue("isEnabled", plugin.isEnabled);
writer.writeStringValue("name", plugin.name);
writer.writeStringValue("@odata.type", plugin.odataType);
writer.writeEnumValue("previewState", plugin.previewState);
writer.writeCollectionOfObjectValues("settings", plugin.settings, serializePluginSetting);
writer.writeEnumValue("supportedAuthTypes", plugin.supportedAuthTypes);
writer.writeAdditionalData(plugin.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param PluginAuth The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePluginAuth(writer, pluginAuth = {}, isSerializingDerivedType = false) {
if (!pluginAuth || isSerializingDerivedType) {
return;
}
writer.writeEnumValue("authType", pluginAuth.authType);
writer.writeStringValue("@odata.type", pluginAuth.odataType);
writer.writeAdditionalData(pluginAuth.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param PluginCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePluginCollectionResponse(writer, pluginCollectionResponse = {}, isSerializingDerivedType = false) {
if (!pluginCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, pluginCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", pluginCollectionResponse.value, serializePlugin);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param PluginSetting The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePluginSetting(writer, pluginSetting = {}, isSerializingDerivedType = false) {
if (!pluginSetting || isSerializingDerivedType) {
return;
}
writer.writeCollectionOfPrimitiveValues("acceptableValues", pluginSetting.acceptableValues);
writer.writeStringValue("defaultValue", pluginSetting.defaultValue);
writer.writeStringValue("description", pluginSetting.description);
writer.writeEnumValue("displayType", pluginSetting.displayType);
writer.writeStringValue("hintText", pluginSetting.hintText);
writer.writeBooleanValue("isRequired", pluginSetting.isRequired);
writer.writeStringValue("label", pluginSetting.label);
writer.writeStringValue("name", pluginSetting.name);
writer.writeStringValue("@odata.type", pluginSetting.odataType);
writer.writeEnumValue("settingValue", pluginSetting.settingValue);
writer.writeStringValue("value", pluginSetting.value);
writer.writeAdditionalData(pluginSetting.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Prompt The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePrompt(writer, prompt = {}, isSerializingDerivedType = false) {
if (!prompt || isSerializingDerivedType) {
return;
}
serializeEntity(writer, prompt, isSerializingDerivedType);
writer.writeStringValue("content", prompt.content);
writer.writeDateValue("createdDateTime", prompt.createdDateTime);
writer.writeCollectionOfObjectValues("evaluations", prompt.evaluations, serializeEvaluation);
writer.writeObjectValue("inputs", prompt.inputs, serializeDictionary);
writer.writeDateValue("lastModifiedDateTime", prompt.lastModifiedDateTime);
writer.writeCollectionOfObjectValues("skillInputDescriptors", prompt.skillInputDescriptors, serializeSkillInputDescriptor);
writer.writeStringValue("skillName", prompt.skillName);
writer.writeEnumValue("type", prompt.type);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param PromptCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializePromptCollectionResponse(writer, promptCollectionResponse = {}, isSerializingDerivedType = false) {
if (!promptCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, promptCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", promptCollectionResponse.value, serializePrompt);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Session The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSession(writer, session = {}, isSerializingDerivedType = false) {
if (!session || isSerializingDerivedType) {
return;
}
serializeEntity(writer, session, isSerializingDerivedType);
writer.writeDateValue("createdDateTime", session.createdDateTime);
writer.writeStringValue("displayName", session.displayName);
writer.writeDateValue("lastModifiedDateTime", session.lastModifiedDateTime);
writer.writeCollectionOfObjectValues("prompts", session.prompts, serializePrompt);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SessionCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSessionCollectionResponse(writer, sessionCollectionResponse = {}, isSerializingDerivedType = false) {
if (!sessionCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, sessionCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", sessionCollectionResponse.value, serializeSession);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SkillInputDescriptor The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSkillInputDescriptor(writer, skillInputDescriptor = {}, isSerializingDerivedType = false) {
if (!skillInputDescriptor || isSerializingDerivedType) {
return;
}
serializeSkillVariableDescriptor(writer, skillInputDescriptor, isSerializingDerivedType);
writer.writeStringValue("defaultValue", skillInputDescriptor.defaultValue);
writer.writeBooleanValue("isRequired", skillInputDescriptor.isRequired);
writer.writeStringValue("placeholderValue", skillInputDescriptor.placeholderValue);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SkillTypeDescriptor The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSkillTypeDescriptor(writer, skillTypeDescriptor = {}, isSerializingDerivedType = false) {
if (!skillTypeDescriptor || isSerializingDerivedType) {
return;
}
writer.writeStringValue("name", skillTypeDescriptor.name);
writer.writeStringValue("@odata.type", skillTypeDescriptor.odataType);
writer.writeAdditionalData(skillTypeDescriptor.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param SkillVariableDescriptor The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeSkillVariableDescriptor(writer, skillVariableDescriptor = {}, isSerializingDerivedType = false) {
if (!skillVariableDescriptor || isSerializingDerivedType) {
return;
}
writer.writeStringValue("description", skillVariableDescriptor.description);
writer.writeStringValue("name", skillVariableDescriptor.name);
writer.writeStringValue("@odata.type", skillVariableDescriptor.odataType);
writer.writeObjectValue("type", skillVariableDescriptor.type, serializeSkillTypeDescriptor);
writer.writeAdditionalData(skillVariableDescriptor.additionalData);
switch (skillVariableDescriptor.odataType) {
case "#microsoft.graph.security.securityCopilot.skillInputDescriptor":
serializeSkillInputDescriptor(writer, skillVariableDescriptor, true);
break;
}
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param Workspace The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeWorkspace(writer, workspace = {}, isSerializingDerivedType = false) {
if (!workspace || isSerializingDerivedType) {
return;
}
serializeEntity(writer, workspace, isSerializingDerivedType);
writer.writeStringValue("displayName", workspace.displayName);
writer.writeCollectionOfObjectValues("plugins", workspace.plugins, serializePlugin);
writer.writeCollectionOfObjectValues("sessions", workspace.sessions, serializeSession);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param WorkspaceCollectionResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeWorkspaceCollectionResponse(writer, workspaceCollectionResponse = {}, isSerializingDerivedType = false) {
if (!workspaceCollectionResponse || isSerializingDerivedType) {
return;
}
serializeBaseCollectionPaginationCountResponse(writer, workspaceCollectionResponse, isSerializingDerivedType);
writer.writeCollectionOfObjectValues("value", workspaceCollectionResponse.value, serializeWorkspace);
}
export const EvaluationResultTypeObject = {
Unknown: "unknown",
Success: "success",
ErrorEscaped: "error",
NeedAdditionalClaims: "needAdditionalClaims",
Rejected: "rejected",
TimedOut: "timedOut",
CapacityExceeded: "capacityExceeded",
UnknownFutureValue: "unknownFutureValue",
};
export const EvaluationStateObject = {
Unknown: "unknown",
Created: "created",
Running: "running",
Completed: "completed",
Cancelled: "cancelled",
Pending: "pending",
Deferred: "deferred",
WaitingForInput: "waitingForInput",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginAuthTypesObject = {
None: "none",
Basic: "basic",
APIKey: "aPIKey",
OAuthAuthorizationCodeFlow: "oAuthAuthorizationCodeFlow",
OAuthClientCredentialsFlow: "oAuthClientCredentialsFlow",
Aad: "aad",
ServiceHttp: "serviceHttp",
AadDelegated: "aadDelegated",
OAuthPasswordGrantFlow: "oAuthPasswordGrantFlow",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginCatalogScopeObject = {
None: "none",
User: "user",
Workspace: "workspace",
Tenant: "tenant",
Global: "global",
GeoGlobal: "geoGlobal",
UserWorkspace: "userWorkspace",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginCategoryObject = {
Hidden: "hidden",
Microsoft: "microsoft",
MicrosoftConnectors: "microsoftConnectors",
Other: "other",
Web: "web",
Testing: "testing",
Plugin: "plugin",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginPreviewStatesObject = {
Ga: "ga",
Public: "public",
Private: "private",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginSettingDisplayTypeObject = {
None: "none",
Textbox: "textbox",
Checkbox: "checkbox",
Dropdown: "dropdown",
UnknownFutureValue: "unknownFutureValue",
};
export const PluginSettingTypeObject = {
String: "string",
Bool: "bool",
Array: "array",
EnumEscaped: "enum",
SecretString: "secretString",
UnknownFutureValue: "unknownFutureValue",
};
export const PromptTypeObject = {
Unknown: "unknown",
Context: "context",
Prompt: "prompt",
Skill: "skill",
Feedback: "feedback",
UnknownFutureValue: "unknownFutureValue",
};
export const SkillPreviewStateObject = {
Ga: "ga",
Public: "public",
Private: "private",
UnknownFutureValue: "unknownFutureValue",
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map