UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
80 lines 3.92 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createHasPayloadLinkResultItemFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeHasPayloadLinkResultItem } from '@microsoft/msgraph-beta-sdk/models/index.js'; // @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 {HasPayloadLinksPostRequestBody} */ export function createHasPayloadLinksPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoHasPayloadLinksPostRequestBody; } /** * 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 {HasPayloadLinksPostResponse} */ export function createHasPayloadLinksPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoHasPayloadLinksPostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ export function deserializeIntoHasPayloadLinksPostRequestBody(hasPayloadLinksPostRequestBody = {}) { return { "backingStoreEnabled": n => { hasPayloadLinksPostRequestBody.backingStoreEnabled = true; }, "payloadIds": n => { hasPayloadLinksPostRequestBody.payloadIds = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ export function deserializeIntoHasPayloadLinksPostResponse(hasPayloadLinksPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(hasPayloadLinksPostResponse)), { "value": n => { hasPayloadLinksPostResponse.value = n.getCollectionOfObjectValues(createHasPayloadLinkResultItemFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ export function serializeHasPayloadLinksPostRequestBody(writer, hasPayloadLinksPostRequestBody = {}) { writer.writeCollectionOfPrimitiveValues("payloadIds", hasPayloadLinksPostRequestBody.payloadIds); writer.writeAdditionalData(hasPayloadLinksPostRequestBody.additionalData); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ export function serializeHasPayloadLinksPostResponse(writer, hasPayloadLinksPostResponse = {}) { serializeBaseCollectionPaginationCountResponse(writer, hasPayloadLinksPostResponse); writer.writeCollectionOfObjectValues("value", hasPayloadLinksPostResponse.value, serializeHasPayloadLinkResultItem); } /** * Uri template for the request builder. */ export const HasPayloadLinksRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/deviceManagementScripts/hasPayloadLinks"; /** * Metadata for all the requests in the request builder. */ export const HasPayloadLinksRequestBuilderRequestsMetadata = { post: { uriTemplate: HasPayloadLinksRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createHasPayloadLinksPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeHasPayloadLinksPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map