UNPKG

@microsoft/msgraph-beta-sdk-groups

Version:
68 lines 3.1 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createItemBodyFromDiscriminatorValue, createTimeCardFromDiscriminatorValue, serializeItemBody } 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 {ClockInPostRequestBody} */ // @ts-ignore export function createClockInPostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoClockInPostRequestBody; } /** * The deserialization information for the current model * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoClockInPostRequestBody(clockInPostRequestBody = {}) { return { "atApprovedLocation": n => { clockInPostRequestBody.atApprovedLocation = n.getBooleanValue(); }, "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 writer Serialization writer to use to serialize this model */ // @ts-ignore export function serializeClockInPostRequestBody(writer, clockInPostRequestBody = {}) { if (clockInPostRequestBody) { writer.writeBooleanValue("atApprovedLocation", clockInPostRequestBody.atApprovedLocation); 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