UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
98 lines 5.01 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, PolicyPlatformTypeObject, serializeBaseCollectionPaginationCountResponse, serializeDeviceManagementResourceAccessProfileBase } 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 {QueryByPlatformTypePostRequestBody} */ // @ts-ignore export function createQueryByPlatformTypePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoQueryByPlatformTypePostRequestBody; } /** * 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 {QueryByPlatformTypePostResponse} */ // @ts-ignore export function createQueryByPlatformTypePostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoQueryByPlatformTypePostResponse; } /** * The deserialization information for the current model * @param QueryByPlatformTypePostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoQueryByPlatformTypePostRequestBody(queryByPlatformTypePostRequestBody = {}) { return { "backingStoreEnabled": n => { queryByPlatformTypePostRequestBody.backingStoreEnabled = true; }, "platformType": n => { queryByPlatformTypePostRequestBody.platformType = n.getEnumValue(PolicyPlatformTypeObject); }, }; } /** * The deserialization information for the current model * @param QueryByPlatformTypePostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoQueryByPlatformTypePostResponse(queryByPlatformTypePostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(queryByPlatformTypePostResponse)), { "value": n => { queryByPlatformTypePostResponse.value = n.getCollectionOfObjectValues(createDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param QueryByPlatformTypePostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeQueryByPlatformTypePostRequestBody(writer, queryByPlatformTypePostRequestBody = {}, isSerializingDerivedType = false) { if (!queryByPlatformTypePostRequestBody || isSerializingDerivedType) { return; } writer.writeEnumValue("platformType", queryByPlatformTypePostRequestBody.platformType); writer.writeAdditionalData(queryByPlatformTypePostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param QueryByPlatformTypePostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeQueryByPlatformTypePostResponse(writer, queryByPlatformTypePostResponse = {}, isSerializingDerivedType = false) { if (!queryByPlatformTypePostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, queryByPlatformTypePostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", queryByPlatformTypePostResponse.value, serializeDeviceManagementResourceAccessProfileBase); } /** * Uri template for the request builder. */ export const QueryByPlatformTypeRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/resourceAccessProfiles/queryByPlatformType"; /** * Metadata for all the requests in the request builder. */ export const QueryByPlatformTypeRequestBuilderRequestsMetadata = { post: { uriTemplate: QueryByPlatformTypeRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createQueryByPlatformTypePostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeQueryByPlatformTypePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map