@microsoft/msgraph-beta-sdk-devicemanagement
Version:
DeviceManagement fluent API for Microsoft Graph
99 lines • 4.44 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createODataErrorFromDiscriminatorValue } from '@microsoft/msgraph-beta-sdk/models/oDataErrors/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 {UpdateGlobalScriptPostRequestBody}
*/
// @ts-ignore
export function createUpdateGlobalScriptPostRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoUpdateGlobalScriptPostRequestBody;
}
/**
* 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 {UpdateGlobalScriptPostResponse}
*/
// @ts-ignore
export function createUpdateGlobalScriptPostResponseFromDiscriminatorValue(parseNode) {
return deserializeIntoUpdateGlobalScriptPostResponse;
}
/**
* The deserialization information for the current model
* @param UpdateGlobalScriptPostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUpdateGlobalScriptPostRequestBody(updateGlobalScriptPostRequestBody = {}) {
return {
"backingStoreEnabled": n => { updateGlobalScriptPostRequestBody.backingStoreEnabled = true; },
"version": n => { updateGlobalScriptPostRequestBody.version = n.getStringValue(); },
};
}
/**
* The deserialization information for the current model
* @param UpdateGlobalScriptPostResponse The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUpdateGlobalScriptPostResponse(updateGlobalScriptPostResponse = {}) {
return {
"backingStoreEnabled": n => { updateGlobalScriptPostResponse.backingStoreEnabled = true; },
"value": n => { updateGlobalScriptPostResponse.value = n.getStringValue(); },
};
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UpdateGlobalScriptPostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUpdateGlobalScriptPostRequestBody(writer, updateGlobalScriptPostRequestBody = {}, isSerializingDerivedType = false) {
if (!updateGlobalScriptPostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeStringValue("version", updateGlobalScriptPostRequestBody.version);
writer.writeAdditionalData(updateGlobalScriptPostRequestBody.additionalData);
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UpdateGlobalScriptPostResponse The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUpdateGlobalScriptPostResponse(writer, updateGlobalScriptPostResponse = {}, isSerializingDerivedType = false) {
if (!updateGlobalScriptPostResponse || isSerializingDerivedType) {
return;
}
writer.writeStringValue("value", updateGlobalScriptPostResponse.value);
writer.writeAdditionalData(updateGlobalScriptPostResponse.additionalData);
}
/**
* Uri template for the request builder.
*/
export const UpdateGlobalScriptRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/deviceHealthScripts/{deviceHealthScript%2Did}/updateGlobalScript";
/**
* Metadata for all the requests in the request builder.
*/
export const UpdateGlobalScriptRequestBuilderRequestsMetadata = {
post: {
uriTemplate: UpdateGlobalScriptRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
errorMappings: {
XXX: createODataErrorFromDiscriminatorValue,
},
adapterMethodName: "send",
responseBodyFactory: createUpdateGlobalScriptPostResponseFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeUpdateGlobalScriptPostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map