UNPKG

@microsoft/msgraph-beta-sdk-devicemanagement

Version:
80 lines 3.96 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} */ 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} */ export function createGetHealthMetricsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoGetHealthMetricsPostResponse; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ export function deserializeIntoGetHealthMetricsPostRequestBody(getHealthMetricsPostRequestBody = {}) { return { "backingStoreEnabled": n => { getHealthMetricsPostRequestBody.backingStoreEnabled = true; }, "metricNames": n => { getHealthMetricsPostRequestBody.metricNames = n.getCollectionOfPrimitiveValues(); }, }; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ export function deserializeIntoGetHealthMetricsPostResponse(getHealthMetricsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(getHealthMetricsPostResponse)), { "value": n => { getHealthMetricsPostResponse.value = n.getCollectionOfObjectValues(createKeyLongValuePairFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ export function serializeGetHealthMetricsPostRequestBody(writer, getHealthMetricsPostRequestBody = {}) { writer.writeCollectionOfPrimitiveValues("metricNames", getHealthMetricsPostRequestBody.metricNames); writer.writeAdditionalData(getHealthMetricsPostRequestBody.additionalData); } /** * Serializes information the current object * @param writer Serialization writer to use to serialize this model */ export function serializeGetHealthMetricsPostResponse(writer, getHealthMetricsPostResponse = {}) { serializeBaseCollectionPaginationCountResponse(writer, getHealthMetricsPostResponse); 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