UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
98 lines 4.83 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createKeyLongValuePairFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, serializeBaseCollectionPaginationCountResponse, serializeKeyLongValuePair } 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 {GetHealthMetricsPostRequestBody} */ // @ts-ignore export function createGetHealthMetricsPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoGetHealthMetricsPostRequestBody; } /** * 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 {GetHealthMetricsPostResponse} */ // @ts-ignore export function createGetHealthMetricsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoGetHealthMetricsPostResponse; } /** * The deserialization information for the current model * @param GetHealthMetricsPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetHealthMetricsPostRequestBody(getHealthMetricsPostRequestBody = {}) { return { "backingStoreEnabled": n => { getHealthMetricsPostRequestBody.backingStoreEnabled = true; }, "metricNames": n => { getHealthMetricsPostRequestBody.metricNames = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @param GetHealthMetricsPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoGetHealthMetricsPostResponse(getHealthMetricsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getHealthMetricsPostResponse)), { "value": n => { getHealthMetricsPostResponse.value = n.getCollectionOfObjectValues(createKeyLongValuePairFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param GetHealthMetricsPostRequestBody 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 serializeGetHealthMetricsPostRequestBody(writer, getHealthMetricsPostRequestBody = {}, isSerializingDerivedType = false) { if (!getHealthMetricsPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("metricNames", getHealthMetricsPostRequestBody.metricNames); writer.writeAdditionalData(getHealthMetricsPostRequestBody.additionalData); } /** * Serializes information the current object * @param GetHealthMetricsPostResponse 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 serializeGetHealthMetricsPostResponse(writer, getHealthMetricsPostResponse = {}, isSerializingDerivedType = false) { if (!getHealthMetricsPostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, getHealthMetricsPostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", getHealthMetricsPostResponse.value, serializeKeyLongValuePair); } /** * Uri template for the request builder. */ export const GetHealthMetricsRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/certificateConnectorDetails/{certificateConnectorDetails%2Did}/getHealthMetrics"; /** * Metadata for all the requests in the request builder. */ export const GetHealthMetricsRequestBuilderRequestsMetadata = { post: { uriTemplate: GetHealthMetricsRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createGetHealthMetricsPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeGetHealthMetricsPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map