UNPKG

@microsoft/msgraph-sdk-users

Version:
102 lines 5.34 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createConvertIdResultFromDiscriminatorValue, deserializeIntoBaseCollectionPaginationCountResponse, ExchangeIdFormatObject, serializeBaseCollectionPaginationCountResponse, serializeConvertIdResult } from '@microsoft/msgraph-sdk/models/index.js'; // @ts-ignore import { createODataErrorFromDiscriminatorValue } from '@microsoft/msgraph-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 {TranslateExchangeIdsPostRequestBody} */ // @ts-ignore export function createTranslateExchangeIdsPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoTranslateExchangeIdsPostRequestBody; } /** * 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 {TranslateExchangeIdsPostResponse} */ // @ts-ignore export function createTranslateExchangeIdsPostResponseFromDiscriminatorValue(parseNode) { return deserializeIntoTranslateExchangeIdsPostResponse; } /** * The deserialization information for the current model * @param TranslateExchangeIdsPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoTranslateExchangeIdsPostRequestBody(translateExchangeIdsPostRequestBody = {}) { return { "backingStoreEnabled": n => { translateExchangeIdsPostRequestBody.backingStoreEnabled = true; }, "InputIds": n => { translateExchangeIdsPostRequestBody.inputIds = n.getCollectionOfPrimitiveValues(); }, "SourceIdType": n => { translateExchangeIdsPostRequestBody.sourceIdType = n.getEnumValue(ExchangeIdFormatObject); }, "TargetIdType": n => { translateExchangeIdsPostRequestBody.targetIdType = n.getEnumValue(ExchangeIdFormatObject); }, }; } /** * The deserialization information for the current model * @param TranslateExchangeIdsPostResponse The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoTranslateExchangeIdsPostResponse(translateExchangeIdsPostResponse = {}) { return Object.assign(Object.assign({}, deserializeIntoBaseCollectionPaginationCountResponse(translateExchangeIdsPostResponse)), { "value": n => { translateExchangeIdsPostResponse.value = n.getCollectionOfObjectValues(createConvertIdResultFromDiscriminatorValue); } }); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param TranslateExchangeIdsPostRequestBody The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeTranslateExchangeIdsPostRequestBody(writer, translateExchangeIdsPostRequestBody = {}, isSerializingDerivedType = false) { if (!translateExchangeIdsPostRequestBody || isSerializingDerivedType) { return; } writer.writeCollectionOfPrimitiveValues("InputIds", translateExchangeIdsPostRequestBody.inputIds); writer.writeEnumValue("SourceIdType", translateExchangeIdsPostRequestBody.sourceIdType); writer.writeEnumValue("TargetIdType", translateExchangeIdsPostRequestBody.targetIdType); writer.writeAdditionalData(translateExchangeIdsPostRequestBody.additionalData); } /** * Serializes information the current object * @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type. * @param TranslateExchangeIdsPostResponse The instance to serialize from. * @param writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeTranslateExchangeIdsPostResponse(writer, translateExchangeIdsPostResponse = {}, isSerializingDerivedType = false) { if (!translateExchangeIdsPostResponse || isSerializingDerivedType) { return; } serializeBaseCollectionPaginationCountResponse(writer, translateExchangeIdsPostResponse, isSerializingDerivedType); writer.writeCollectionOfObjectValues("value", translateExchangeIdsPostResponse.value, serializeConvertIdResult); } /** * Uri template for the request builder. */ export const TranslateExchangeIdsRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/translateExchangeIds"; /** * Metadata for all the requests in the request builder. */ export const TranslateExchangeIdsRequestBuilderRequestsMetadata = { post: { uriTemplate: TranslateExchangeIdsRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createTranslateExchangeIdsPostResponseFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeTranslateExchangeIdsPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map