UNPKG

@microsoft/msgraph-beta-sdk-users

Version:
72 lines 4.06 kB
/* tslint:disable */ /* eslint-disable */ // Generated by Microsoft Kiota // @ts-ignore import { createComputeRightsAndInheritanceResultFromDiscriminatorValue, createProtectedContentFromDiscriminatorValue, serializeProtectedContent } 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 {ComputeRightsAndInheritancePostRequestBody} */ // @ts-ignore export function createComputeRightsAndInheritancePostRequestBodyFromDiscriminatorValue(parseNode) { return deserializeIntoComputeRightsAndInheritancePostRequestBody; } /** * The deserialization information for the current model * @param ComputeRightsAndInheritancePostRequestBody The instance to deserialize into. * @returns {Record<string, (node: ParseNode) => void>} */ // @ts-ignore export function deserializeIntoComputeRightsAndInheritancePostRequestBody(computeRightsAndInheritancePostRequestBody = {}) { return { "backingStoreEnabled": n => { computeRightsAndInheritancePostRequestBody.backingStoreEnabled = true; }, "delegatedUserEmail": n => { computeRightsAndInheritancePostRequestBody.delegatedUserEmail = n.getStringValue(); }, "locale": n => { computeRightsAndInheritancePostRequestBody.locale = n.getStringValue(); }, "protectedContents": n => { computeRightsAndInheritancePostRequestBody.protectedContents = n.getCollectionOfObjectValues(createProtectedContentFromDiscriminatorValue); }, "supportedContentFormats": n => { computeRightsAndInheritancePostRequestBody.supportedContentFormats = n.getCollectionOfPrimitiveValues(); }, }; } /** * Serializes information the current object * @param ComputeRightsAndInheritancePostRequestBody 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 serializeComputeRightsAndInheritancePostRequestBody(writer, computeRightsAndInheritancePostRequestBody = {}, isSerializingDerivedType = false) { if (!computeRightsAndInheritancePostRequestBody || isSerializingDerivedType) { return; } writer.writeStringValue("delegatedUserEmail", computeRightsAndInheritancePostRequestBody.delegatedUserEmail); writer.writeStringValue("locale", computeRightsAndInheritancePostRequestBody.locale); writer.writeCollectionOfObjectValues("protectedContents", computeRightsAndInheritancePostRequestBody.protectedContents, serializeProtectedContent); writer.writeCollectionOfPrimitiveValues("supportedContentFormats", computeRightsAndInheritancePostRequestBody.supportedContentFormats); writer.writeAdditionalData(computeRightsAndInheritancePostRequestBody.additionalData); } /** * Uri template for the request builder. */ export const ComputeRightsAndInheritanceRequestBuilderUriTemplate = "{+baseurl}/users/{user%2Did}/informationProtection/sensitivityLabels/computeRightsAndInheritance"; /** * Metadata for all the requests in the request builder. */ export const ComputeRightsAndInheritanceRequestBuilderRequestsMetadata = { post: { uriTemplate: ComputeRightsAndInheritanceRequestBuilderUriTemplate, responseBodyContentType: "application/json", errorMappings: { XXX: createODataErrorFromDiscriminatorValue, }, adapterMethodName: "send", responseBodyFactory: createComputeRightsAndInheritanceResultFromDiscriminatorValue, requestBodyContentType: "application/json", requestBodySerializer: serializeComputeRightsAndInheritancePostRequestBody, requestInformationContentSetMethod: "setContentFromParsable", }, }; /* tslint:enable */ /* eslint-enable */ //# sourceMappingURL=index.js.map