@microsoft/msgraph-beta-sdk-solutions
Version:
Solutions fluent API for Microsoft Graph
78 lines • 4.16 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createCrossTenantMigrationJobFromDiscriminatorValue, createExchangeOnlineCrossTenantMigrationSettingsFromDiscriminatorValue, serializeExchangeOnlineCrossTenantMigrationSettings } 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 {ValidatePostRequestBody}
*/
// @ts-ignore
export function createValidatePostRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoValidatePostRequestBody;
}
/**
* The deserialization information for the current model
* @param ValidatePostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoValidatePostRequestBody(validatePostRequestBody = {}) {
return {
"backingStoreEnabled": n => { validatePostRequestBody.backingStoreEnabled = true; },
"completeAfterDateTime": n => { validatePostRequestBody.completeAfterDateTime = n.getStringValue(); },
"displayName": n => { validatePostRequestBody.displayName = n.getStringValue(); },
"exchangeSettings": n => { validatePostRequestBody.exchangeSettings = n.getObjectValue(createExchangeOnlineCrossTenantMigrationSettingsFromDiscriminatorValue); },
"resources": n => { validatePostRequestBody.resources = n.getCollectionOfPrimitiveValues(); },
"resourceType": n => { validatePostRequestBody.resourceType = n.getStringValue(); },
"sourceTenantId": n => { validatePostRequestBody.sourceTenantId = n.getStringValue(); },
"workloads": n => { validatePostRequestBody.workloads = n.getCollectionOfPrimitiveValues(); },
};
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param ValidatePostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeValidatePostRequestBody(writer, validatePostRequestBody = {}, isSerializingDerivedType = false) {
if (!validatePostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeStringValue("completeAfterDateTime", validatePostRequestBody.completeAfterDateTime);
writer.writeStringValue("displayName", validatePostRequestBody.displayName);
writer.writeObjectValue("exchangeSettings", validatePostRequestBody.exchangeSettings, serializeExchangeOnlineCrossTenantMigrationSettings);
writer.writeCollectionOfPrimitiveValues("resources", validatePostRequestBody.resources);
writer.writeStringValue("resourceType", validatePostRequestBody.resourceType);
writer.writeStringValue("sourceTenantId", validatePostRequestBody.sourceTenantId);
writer.writeCollectionOfPrimitiveValues("workloads", validatePostRequestBody.workloads);
writer.writeAdditionalData(validatePostRequestBody.additionalData);
}
/**
* Uri template for the request builder.
*/
export const ValidateRequestBuilderUriTemplate = "{+baseurl}/solutions/migrations/crossTenantMigrationJobs/validate";
/**
* Metadata for all the requests in the request builder.
*/
export const ValidateRequestBuilderRequestsMetadata = {
post: {
uriTemplate: ValidateRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
errorMappings: {
XXX: createODataErrorFromDiscriminatorValue,
},
adapterMethodName: "send",
responseBodyFactory: createCrossTenantMigrationJobFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeValidatePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map