UNPKG

@microsoft/msgraph-sdk-groups

Version:
70 lines 3.18 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createItemBodyFromDiscriminatorValue, createTimeCardFromDiscriminatorValue, serializeItemBody } 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 {ClockInPostRequestBody} */ // @ts-ignore export function createClockInPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoClockInPostRequestBody; } /** * The deserialization information for the current model * @param ClockInPostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoClockInPostRequestBody(clockInPostRequestBody = {}) { return { "backingStoreEnabled": n => { clockInPostRequestBody.backingStoreEnabled = true; }, "isAtApprovedLocation": n => { clockInPostRequestBody.isAtApprovedLocation = n.getBooleanValue(); }, "notes": n => { clockInPostRequestBody.notes = n.getObjectValue(createItemBodyFromDiscriminatorValue); }, "onBehalfOfUserId": n => { clockInPostRequestBody.onBehalfOfUserId = n.getStringValue(); }, }; } /** * Serializes information the current object * @param ClockInPostRequestBody 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 serializeClockInPostRequestBody(writer, clockInPostRequestBody = {}, isSerializingDerivedType = false) { if (!clockInPostRequestBody || isSerializingDerivedType) { return; } writer.writeBooleanValue("isAtApprovedLocation", clockInPostRequestBody.isAtApprovedLocation); writer.writeObjectValue("notes", clockInPostRequestBody.notes, serializeItemBody); writer.writeStringValue("onBehalfOfUserId", clockInPostRequestBody.onBehalfOfUserId); writer.writeAdditionalData(clockInPostRequestBody.additionalData); } /** * Uri template for the request builder. */ export const ClockInRequestBuilderUriTemplate = "{+baseurl}/groups/{group%2Did}/team/schedule/timeCards/clockIn"; /** * Metadata for all the requests in the request builder. */ export const ClockInRequestBuilderRequestsMetadata = { post: { uriTemplate: ClockInRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createTimeCardFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeClockInPostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map