@microsoft/msgraph-beta-sdk-devicemanagement
Version:
DeviceManagement fluent API for Microsoft Graph
70 lines • 4.55 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
// Generated by Microsoft Kiota
// @ts-ignore
import { createCloudCertificationAuthorityFromDiscriminatorValue, createTrustChainCertificateFromDiscriminatorValue, serializeTrustChainCertificate } 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 {UploadExternallySignedCertificationAuthorityCertificatePostRequestBody}
*/
// @ts-ignore
export function createUploadExternallySignedCertificationAuthorityCertificatePostRequestBodyFromDiscriminatorValue(parseNode) {
return deserializeIntoUploadExternallySignedCertificationAuthorityCertificatePostRequestBody;
}
/**
* The deserialization information for the current model
* @param UploadExternallySignedCertificationAuthorityCertificatePostRequestBody The instance to deserialize into.
* @returns {Record<string, (node: ParseNode) => void>}
*/
// @ts-ignore
export function deserializeIntoUploadExternallySignedCertificationAuthorityCertificatePostRequestBody(uploadExternallySignedCertificationAuthorityCertificatePostRequestBody = {}) {
return {
"backingStoreEnabled": n => { uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.backingStoreEnabled = true; },
"certificationAuthorityVersion": n => { uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.certificationAuthorityVersion = n.getNumberValue(); },
"signedCertificate": n => { uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.signedCertificate = n.getStringValue(); },
"trustChainCertificates": n => { uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.trustChainCertificates = n.getCollectionOfObjectValues(createTrustChainCertificateFromDiscriminatorValue); },
};
}
/**
* Serializes information the current object
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
* @param UploadExternallySignedCertificationAuthorityCertificatePostRequestBody The instance to serialize from.
* @param writer Serialization writer to use to serialize this model
*/
// @ts-ignore
export function serializeUploadExternallySignedCertificationAuthorityCertificatePostRequestBody(writer, uploadExternallySignedCertificationAuthorityCertificatePostRequestBody = {}, isSerializingDerivedType = false) {
if (!uploadExternallySignedCertificationAuthorityCertificatePostRequestBody || isSerializingDerivedType) {
return;
}
writer.writeNumberValue("certificationAuthorityVersion", uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.certificationAuthorityVersion);
writer.writeStringValue("signedCertificate", uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.signedCertificate);
writer.writeCollectionOfObjectValues("trustChainCertificates", uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.trustChainCertificates, serializeTrustChainCertificate);
writer.writeAdditionalData(uploadExternallySignedCertificationAuthorityCertificatePostRequestBody.additionalData);
}
/**
* Uri template for the request builder.
*/
export const UploadExternallySignedCertificationAuthorityCertificateRequestBuilderUriTemplate = "{+baseurl}/deviceManagement/cloudCertificationAuthority/{cloudCertificationAuthority%2Did}/uploadExternallySignedCertificationAuthorityCertificate";
/**
* Metadata for all the requests in the request builder.
*/
export const UploadExternallySignedCertificationAuthorityCertificateRequestBuilderRequestsMetadata = {
post: {
uriTemplate: UploadExternallySignedCertificationAuthorityCertificateRequestBuilderUriTemplate,
responseBodyContentType: "application/json",
errorMappings: {
XXX: createODataErrorFromDiscriminatorValue,
},
adapterMethodName: "send",
responseBodyFactory: createCloudCertificationAuthorityFromDiscriminatorValue,
requestBodyContentType: "application/json",
requestBodySerializer: serializeUploadExternallySignedCertificationAuthorityCertificatePostRequestBody,
requestInformationContentSetMethod: "setContentFromParsable",
},
};
/* tslint:enable */
/* eslint-enable */
//# sourceMappingURL=index.js.map