@microsoft/msgraph-beta-sdk-devicemanagement
Version:
DeviceManagement fluent API for Microsoft Graph
75 lines • 4.2 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 {UpdateDevicePropertiesPostRequestBody}
*/
// @ts-ignore
export function createUpdateDevicePropertiesPostRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoUpdateDevicePropertiesPostRequestBody;
}
/**
* The deserialization information for the current model
* @param UpdateDevicePropertiesPostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUpdateDevicePropertiesPostRequestBody(updateDevicePropertiesPostRequestBody = {}) {
return {
"addressableUserName": n => { updateDevicePropertiesPostRequestBody.addressableUserName = n.getStringValue(); },
"backingStoreEnabled": n => { updateDevicePropertiesPostRequestBody.backingStoreEnabled = true; },
"deviceAccountPassword": n => { updateDevicePropertiesPostRequestBody.deviceAccountPassword = n.getStringValue(); },
"deviceAccountUpn": n => { updateDevicePropertiesPostRequestBody.deviceAccountUpn = n.getStringValue(); },
"deviceFriendlyName": n => { updateDevicePropertiesPostRequestBody.deviceFriendlyName = n.getStringValue(); },
"displayName": n => { updateDevicePropertiesPostRequestBody.displayName = n.getStringValue(); },
"groupTag": n => { updateDevicePropertiesPostRequestBody.groupTag = n.getStringValue(); },
"userPrincipalName": n => { updateDevicePropertiesPostRequestBody.userPrincipalName = n.getStringValue(); },
};
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UpdateDevicePropertiesPostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUpdateDevicePropertiesPostRequestBody(writer, updateDevicePropertiesPostRequestBody = {}, isSerializingDerivedType = false) {
if (!updateDevicePropertiesPostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeStringValue("addressableUserName", updateDevicePropertiesPostRequestBody.addressableUserName);
writer.writeStringValue("deviceAccountPassword", updateDevicePropertiesPostRequestBody.deviceAccountPassword);
writer.writeStringValue("deviceAccountUpn", updateDevicePropertiesPostRequestBody.deviceAccountUpn);
writer.writeStringValue("deviceFriendlyName", updateDevicePropertiesPostRequestBody.deviceFriendlyName);
writer.writeStringValue("displayName", updateDevicePropertiesPostRequestBody.displayName);
writer.writeStringValue("groupTag", updateDevicePropertiesPostRequestBody.groupTag);
writer.writeStringValue("userPrincipalName", updateDevicePropertiesPostRequestBody.userPrincipalName);
writer.writeAdditionalData(updateDevicePropertiesPostRequestBody.additionalData);
}
/**
* Uri template for the request builder.
*/
export const UpdateDevicePropertiesRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/windowsAutopilotDeviceIdentities/{windowsAutopilotDeviceIdentity%2Did}/updateDeviceProperties";
/**
* Metadata for all the requests in the request builder.
*/
export const UpdateDevicePropertiesRequestBuilderRequestsMetadata = {
post: {
uriTemplate: UpdateDevicePropertiesRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
errorMappings: {
XXX: createODataErrorFromDiscriminatorValue,
},
adapterMethodName: "sendNoResponseContent",
requestBodyContentType: "application/json",
requestBodySerializer: serializeUpdateDevicePropertiesPostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map